Support for CRM 2011

Nov 3, 2010 at 2:36 PM
Edited Nov 4, 2010 at 4:41 PM

Hi,

Is anyone planning to (or better yet, has work begun) to add support for CRM 2011? From what I've been told, CRM 2011 is very close to release. I believe CRM OnLine will be released before the end of 2010 (its already in beta) with the boxed version following in early 2011 (its either on its last CTP or is also in beta).

My reason for asking is that I am enthusiastic about this project and am seriously considering using it. However, if this project isn't active.. then I have to consider the cost of maintaining the code base myslef or stay pinned back on CRM 4.0.

*** UPDATE ***

The 2007 end points are being retained in CRM 2011. So, in theory.. this solution should continue to function with little if any modifications. I have signed up for a beta CRM OnLine 2011 site and will attempt to test the solution as soon as possible. I also have copies of the WSDL's for CRM 2011's implementation of the 2007 end points. So, I would be happy to send those to anyone in the community who is qualified to validate that they are consistent with the interfaces this was written against.

I will also be testing this against an existing CRM 4.0 OnLine site.

***************

Thanks.

Coordinator
Nov 5, 2010 at 5:22 PM

Hi,

I've just been waiting for this question.... :-)

CRM 2011 will be rolled out beginning of next year and as far as I understand it will be backward compatible. I haven't had a chance to test and frankly I do not have much time to do it either. A quick background...

I started this project three years ago while setting up a support organization. We couldn't find a way of dealing with incoming cases and created CRM Queue Manager to solve specific problems for us. I decided to make it publicly available because I thought c360 Email2Queue was simply redicoulously priced (per user). It seems like more people thought the same and off it took. I have no clue how many people are actively using it today because I never hear much in the discussion board. Could be because it just works :-). I guess quite a few companies have their queues monitored by it, though...

My problem is that I've moved on - I'm with a different company now and I'm in a different role. I don't have good access to new releases of Dynamics CRM and this would just be a big pro bono project for the CRM community as it has no real relevance to me anymore. We've been adding lots of cool features based on user request which actually has added value to my ex-company as well. But right now it's just work. I'm more than happy to hand over the control to someone else to continue the development. I guess the changes required to make it tick against CRM 2011 would be minor, if any. Sooner or later someone will develop a workflow that handles all this from within CRM and then this project is obsolete. This is how I would do it if I would start all over again. Perhaps this posting could spark someone into developing just this. I haven't gone through the complete feature spec for CRM 2011 to check whether it's easier to solve in this version.

I've been monitoring the discussion boards to help people out as I started this project and most of the issues have been easy to fix without requiring any code change. However, any major changes required need to be implemented by a new Queue Manager hero.

Hope you understand.

Thanks,
Manso

Nov 5, 2010 at 6:30 PM

Hi Manso,

Yes, I understand completely. Its exactly why, although I am a big fan of open source, I never seem to have the time to contribute.

I'll test this against CRM 2011 and post the results here. As you said, it should just work.

Feb 25, 2011 at 7:42 PM

Any news of successfull testing with 2011 yet?

 

Cheers

Glen

Feb 25, 2011 at 9:34 PM
No, but will be performing testing next week. In theory, it should
work. I'll share my results here.

On 2/25/11, Grizzlytech <notifications@codeplex.com> wrote:
> From: Grizzlytech
>
> Any news of successfull testing with 2011 yet? CheersGlen
>
>
Mar 2, 2011 at 10:57 PM
Edited Mar 2, 2011 at 10:58 PM

I am testing this against CRM 2011 ONLINE. I just started testing today. Thought I'd post a quick status report.

Microsoft's hosting services have been flakey all day today, and I'm afraid that some of my tests may be failing as a result of these issues (as opposed to a true compatability issue with CRM 2011).

So far, my testing bombs on line 58 of the QueueMonitor.vb file. I've reviewed the list of deprecated and removed entities, attributes, views, and messages. I don't see anything that should cause this particular call to fail. It is likely, however, that some functionality will be lost b/c the "route" and "handle" messages have been removed. Here is the documentation I am referencing:

http://msdn.microsoft.com/en-us/library/gg334316.aspx
http://msdn.microsoft.com/en-us/library/gg509038.aspx
http://msdn.microsoft.com/en-us/library/gg334371.aspx
http://msdn.microsoft.com/en-us/library/gg328322.aspx

 I am using the same DiscoveryService URL specified in the documentation.

https://dev.crm.dynamics.com/MSCRMServices/2007/Passport/CrmDiscoveryService.asmx

Authentication appears to succeed (the passport ticket and authentication token are created). However, I am concerned that the CRMServiceURL returned by the discovery service may be incorrect or not working correctly. Like I said, our CRM system has been slow or down several times today). The URL syntax is:
https://<OrganizationName>.api.crm.dynamics.com/MSCrmServices/2007/CrmService.asmx.

The first call that is made to CrmService.asmx at this URL fails. The response is a generic SOAPException (Server was unable to process request).

 

 

Developer
Mar 3, 2011 at 12:33 PM

We heavily use CRM Queue Manager in our support organization.  We have plans to roll out CRM 2011 On-Premise.  I'm sure I'll be tasked with getting it working with the new version and as I find fixes/workarounds I'll be sure to post them.  I have added custom code into our implementation so I won't be able to post full source code and compiled code but I will be able to post changes to the source that fixes anything that comes up.

Who knows, maybe it will work just fine...

Mar 3, 2011 at 1:24 PM

Another quick update.

I have repeated my test against an ON PREMISE 2011 Release Candidate. Unfortunately, the results were identical to what I described for my OnLine testing. Authentication succeeds, but the very furst call to RetrieveMultiple fails with a generic SOAP error (Server was unable to process request).

I have a sneaking suspicion that to support 2011 the code path will have to branch on version and call the new 2011 endpoint.

Developer
Sep 22, 2011 at 12:58 PM

It turns out the queue manager throws an exception with CRM 2011 due to a bug in CRM.  The XML parser isn't able to parse the SOAP response correctly if you are trying to return the objectid attribute.  You can read more about it here: http://social.microsoft.com/Forums/en/crmdevelopment/thread/86d9647e-ce5e-493d-ae54-ae1cf249ced0.

I added some code into QueueMonitor.vb which takes the existing query parameters and uses FetchXML rather than RetrieveMultiple.  It then fills the objQueueResult object with the needed attributes so the rest of the code doesn't need modification.  I can't post the full source or compiled code because I have added other custom functionality to our QueueManager implementation which would require much more explanation.

Disclaimer: my native language is C# so the VB.NET code may not make sense to VB.NET fans.  ;-)

In the ProcessQueue subroutine you will find the following line:

objQueueResult = _objCRM.GetCrmService.RetrieveMultiple(objQueueItems.Query).BusinessEntities

Comment out this line and add the following code above it:

	    Dim req As QueryExpressionToFetchXmlRequest = New QueryExpressionToFetchXmlRequest()
            req.Query = objQueueItems.Query
            Dim resp As QueryExpressionToFetchXmlResponse = CType(_objCRM.GetCrmService.Execute(req), QueryExpressionToFetchXmlResponse)
            Dim data As String = _objCRM.GetCrmService.Fetch(resp.FetchXml)

            Dim doc As XmlDocument = New XmlDocument()
            doc.LoadXml(data)
            Dim nodelist As XmlNodeList = doc.GetElementsByTagName("result")

            ReDim objQueueResult(nodelist.Count - 1)
            'Create a business entity based on parsed XML
            For i As Integer = 0 To nodelist.Count - 1
                Dim queueitem As New queueitem()
                queueitem.title = nodelist(i).Item("title").InnerText
                queueitem.objectid = New CRM.Lookup()
                queueitem.objectid.Value = New Guid(nodelist(i).Item("objectid").InnerText)
                objQueueResult(i) = queueitem
            Next

Based on a review of the rest of the code, I suspect the same problem will occur in the ProcessTempQueue subroutine.  I didn't make any changes there because we do not automatically clear out items in the tempqueue.  If you do use this process, I think you will have to use something similar to the above code to work around the bug there.

If I get the time, I'll open a case with Microsoft to get their take on the bug.

Developer
Sep 22, 2011 at 4:05 PM

One other small change, if you upgraded your CRM 4.0 oraganization to 2011, the default queue for a user is now the user's private queue, not the WIP queue.  More details can be found here: http://msdn.microsoft.com/en-us/library/gg327885.aspx  This is why moving the new case will not work since QueueManager is looking in the WIP queue not the private queue.

To adjust for this change, modify the CRMMonitor.vb file, in the CreateCase subroutine.  The following line should be changed from a 3 to a 2 as shown below.

        objQueueQuery.Criteria.Conditions.AddCondition("queuetypecode", ConditionOperator.Equal, 3) '3 is WIP queue type

        objQueueQuery.Criteria.Conditions.AddCondition("queuetypecode", ConditionOperator.Equal, 2) '2 is private queue type

Developer
Oct 4, 2011 at 9:07 PM

I have downloaded the source and made the changes you suggested. I think my install is failing because I don't have the correct crmurl.

Can you confirm what this should be for CRM 2011 - Thanks

Oct 14, 2011 at 2:53 PM

I've been helping dsaunders

 

We are getting a response saying that we're not authorised from the web service.

What is the exact authentication setup required against the url

https://ourserver.dynamics.com/MSCRMServices/2007/CrmService.asmx

Is this the correct sort of url?

 

Thanks in advance

 

 

 

 

Developer
Oct 21, 2011 at 12:48 PM

dsaunders and rgillingham,

I only have on-premise installations; unfortunately I don't have access to the hosted online CRM.  I didn't have to make any changes to the crmserviceurl when moving from CRM 4.0 to 2011.  The on-premise and online installations keep the old web service URLs for backwards compatibility.  Here is my crmserviceurl:

<add key="crmserviceurl" value="http://crmserver/MSCrmServices/2007/CrmService.asmx"/>

 

Based on troglite's resonse, I wonder if for the online CRM solution you need to use one of the following formats?

https://<OrganizationName>.api.crm.dynamics.com/MSCrmServices/2007/CrmService.asmx

or

https://<OrganizationName>.crm.dynamics.com/MSCRMServices/2007/Passport/CrmDiscoveryService.asmx

Nov 3, 2011 at 10:34 AM

Hello,

I followed your steps by recompile the project, everything seems to work but when it wants to change the mail to case i receive this message:

Unhandled exception occurred in ProcessQueue

Exception: 
Object reference not set to an instance of an object.

Stack trace: 
   at QueueManager.Service.QueueMonitor.ProcessQueue(QueueSetting QueueSettings) in C:\Users\**\Desktop\crm queue manager\QueueManagerService\QueueMonitor.vb:line 89

 Any ideas?


Developer
Nov 4, 2011 at 12:16 PM

What is your code at line 89?  Could you post a portion of the QueueMonitor.vb code, maybe lines 40-100, with line numbers.  That would help in troubleshooting.

Developer
Nov 4, 2011 at 3:50 PM

Hello,

Can you confirm if you have this working against the online version of CRM 2011. If so can you let me know the format of the service URL to use?

Many thanks

Nov 7, 2011 at 8:06 AM
Edited Nov 7, 2011 at 8:07 AM
dsaunders wrote:

Can you confirm if you have this working against the online version of CRM 2011. If so can you let me know the format of the service URL to use?

I am using this: http://**/MSCrmServices/2007/CrmService.asmx

This is line 89:                 objQueueOwner = CType(_objCRM.GetSingleData(EntityName.systemuser.ToString, objQueue.primaryuserid.Value, New String() {"internalemailaddress"}), systemuser)

cmerrill here is my code:

          'Query the queue for queue items and retrieve the columns neccessary
            objQueueItems.Columns.AddColumns("title", "sender", "objectid", "enteredon")

            'Filter on the queue id and object type 4202 (EntityName.email)
            objQueueItems.Criteria.FilterOperator = LogicalOperator.And
            objQueueItems.Criteria.Conditions.AddCondition("queueid", ConditionOperator.Equal, QueueSettings.QueueID)
            objQueueItems.Criteria.Conditions.AddCondition("objecttypecode", ConditionOperator.Equal, 4202)

            'Add email as a linked entity and add a condition to only process e-mail with nothing in the regarding field.
            'That should be all new e-mail. 
            If Not QueueSettings.RemoveRepliesFromQueue Then
                objLink = objQueueItems.LinkEntities.AddLink("objectid", "email", "activityid")
                objLink.Criteria.FilterOperator = LogicalOperator.And
                objLink.Criteria.Conditions.AddCondition("regardingobjectid", ConditionOperator.Null, Nothing)
            End If

            LogHelper.Output("Querying queue '{0}'...", QueueSettings.Name)

            Dim req As QueryExpressionToFetchXmlRequest = New QueryExpressionToFetchXmlRequest()
            req.Query = objQueueItems.Query
            Dim resp As QueryExpressionToFetchXmlResponse = CType(_objCRM.GetCrmService.Execute(req), QueryExpressionToFetchXmlResponse)
            Dim data As String = _objCRM.GetCrmService.Fetch(resp.FetchXml)

            Dim doc As XmlDocument = New XmlDocument()
            doc.LoadXml(data)
            Dim nodelist As XmlNodeList = doc.GetElementsByTagName("result")

            ReDim objQueueResult(nodelist.Count - 1)
            'Create a business entity based on parsed XML
            For i As Integer = 0 To nodelist.Count - 1
                Dim queueitem As New queueitem()
                queueitem.title = nodelist(i).Item("title").InnerText
                queueitem.objectid = New CRM.Lookup()
                queueitem.objectid.Value = New Guid(nodelist(i).Item("objectid").InnerText)
                objQueueResult(i) = queueitem
            Next

            'Execute the query
            'objQueueResult = _objCRM.GetCrmService.RetrieveMultiple(objQueueItems.Query).BusinessEntities

            LogHelper.Output("Found {0} e-mail on queue.", objQueueResult.Length.ToString)

            'We need the queue e-mail address and owner
            If objQueueResult.Length > 0 Then
                objQueue = CType(_objCRM.GetSingleData(EntityName.queue.ToString, New Guid(QueueSettings.QueueID), New String() {"primaryuserid", "emailaddress", "name"}), queue)
                If objQueue Is Nothing Then
                    LogHelper.Log(String.Format("Can't find queue specified in '{0}'.", QueueSettings.Name), Nothing, LogHelper.LogType.Warning)
                    Exit Sub
                End If
                'Also get the owner e-mail address to be used for notification.
                objQueueOwner = CType(_objCRM.GetSingleData(EntityName.systemuser.ToString, objQueue.primaryuserid.Value, New String() {"internalemailaddress"}), systemuser)
            End If

            'Loop through result
            For Each objItem As queueitem In objQueueResult

                LogHelper.Output("", False)


Thanks!

Developer
Nov 8, 2011 at 12:02 PM

mexxwell,

Looking at your code I see nothing obvious wrong.  Since line 89 is dealing with the owner of the queue, check to make sure the owner of the queue has a value set for the internalemailaddress field.  If that doesn't help, are you familiar with debugging?  Place a break at line 89 and examine all of the objects being passed into the GetSingleData method to make sure they are valid and not null.

Developer
Jan 25, 2012 at 12:26 PM

We are currently testing a comprehensive update to this great utility, and have made the following changes:

  1. QueueMonitor.vb. Function ProcessQueue. Function reworkered at beginning. Before it retrieved queueitems and than emails. Right now it retrieves emails directly by query with link to queueitems.This fixes error described here http://crmqueuemanager.codeplex.com/discussions/233329 (comment from cmerrill from Sep 22 2011 at 3:58 PM) without fetchxml request
  2. QueueMonitor.vb. Using primaryuserid field in queue object was changed to ownerid everywhere. Primaryuserid field is obsolete in CRM 2011
  3. QueueMonitor.vb. Sub AddEmailsFieldsForSearch(ByRef query As QueryExpressionHelper, ByVal email As String). Just moving recently used code to separate sub
  4. QueueMonitor.vb. CreateCase function changed. It doesn't retrieve user default queue from CRM now. It takes it from systemuser object and queueid field
  5. CRMHelper.vb. New function RouteNewCaseToUserQueue added. It replaces function RouteCase which doesn't work in CRM 2011
  6. QueueMonitor.vb. ProcessTempQueue function changed from retrieving queueitems to retrieving emails. Almost same as point 1.
  7. Little fixes (checking for nulls, etc.)

We have an on-premise installation utility for a quick and easy install, and are ready to release this code to cmerrill for adding to this project when all/most of the bugs are found and ironed out - guessing end of this week, beginning of next. 

We need this code for our helpdesk, and seeing as how the developers put in a huge amount of time and effort to make this great utility, and then were so generous as to give it away to all of us to use, we hired a developer to fix this up for us, and contribute to this code. I hope everybody can continue to contribute in terms of code or documentation to keep this great utility alive and useful.

Regards,

Martijn

Feb 6, 2012 at 8:08 AM

Hi, any news regarding the on-premise installation utility?

I am very interested in testing it.

Developer
Feb 6, 2012 at 8:22 AM
ccraciun wrote:

Hi, any news regarding the on-premise installation utility?

I am very interested in testing it.

Hi,

Unfortunately I have not heard from the project developers / maintainers. As soon as I do I am happy to put it up. If you can send me a PM with your email, I can make it available for download for you. 

Thanks

Martijn

Feb 6, 2012 at 11:15 AM

You can send me the download info at ccraciun (at) live (dot) com

Many thanks!

Developer
Feb 6, 2012 at 1:04 PM

Hello,

Very interested to here you have been able to progress this forwards on CRM 2011.

Can you confirm if you think this will work on the CRM2011 Online version which we have. I would be happy to test for you.

Many thanks

Developer
Feb 6, 2012 at 1:19 PM

Hi,

We are using this in production and it works fine. we had to make a few small changes, mostly to deal with how 2011 works on some things, but all works great. 

We have built and tested this for on-premise only, and not for online. 

Thanks

Martijn

Developer
Feb 6, 2012 at 4:44 PM
mdekkers wrote:

Hi,

We are using this in production and it works fine. we had to make a few small changes, mostly to deal with how 2011 works on some things, but all works great. 

We have built and tested this for on-premise only, and not for online. 

Thanks

Martijn

Hi,

Really appreciate your reply.

Would you be able to provide a download of the program so that I can test against the CRM online system

Many thanks

Feb 7, 2012 at 10:59 AM
Edited Feb 7, 2012 at 10:59 AM

Hi Martijn,

Did you receive my contact details? I would really appreciate it if you could send me the utility for testing; I tried already several other approaches in order to solve the email to case issue, but unfortunately no one seems to provide such nice features and functionality as the Queue Manager utility.

Thank you!

Catalin

Feb 16, 2012 at 9:37 AM
mdekkers wrote:

Hi,

We are using this in production and it works fine. we had to make a few small changes, mostly to deal with how 2011 works on some things, but all works great. 

We have built and tested this for on-premise only, and not for online. 

Thanks

Martijn

Hi, we are planning an upgrade from crm4 to crm2011.

This plugin seems to be the only unique custom product.

Could I get an updated version of the plugin to run on my workbench

Thanks a bunch

aktapuss at gmail dot com

Developer
Feb 16, 2012 at 9:39 AM

Hi,

We are fixing a few minor bugs, when that is done I will make an updated version available. 

Thanks,

Martijn

Developer
Feb 16, 2012 at 6:04 PM

I just found out that the removerepliesfromqueue option will remove emails from the queue and not convert them to cases if the email regards anything.  In my option, it should remove emails from the queue only if they regard a case.  If an email regards another entity then it should be converted to a case.

For example, we had an email come into the CRM queue that was regarding a contact and this email wasn't converted to a case.  I modified our code to only remove replies from the queue if the regarding field regards a case(incident) entity.

You may want to include this in your fixes.

Developer
Feb 17, 2012 at 9:25 PM

I found that UpdateRollup 6 for CRM2011 breaks the DetachFromQueueEmail message.  If you are getting the error:

Crm Exception: Message: Request not supported: DetachFromQueueEmail, ErrorCode: -2147220715

Change the following code:

objDetachRequest = New DetachFromQueueEmailRequest
objDetachRequest.EmailId = objEmail.activityid.Value
objDetachRequest.QueueId = objQItem.queueid.Value
_objCRM.GetCrmService.Execute(objDetachRequest)

to:

_objCRM.GetCrmService.Delete(EntityName.queueitem.ToString, objQItem.queueitemid.Value)

Developer
Feb 23, 2012 at 7:01 PM

Hi

If I can get a copy of your code, i'll add Office 365 and CRM Online 2011 functionallity to it.
Hopefully I can also get it to work with the free Office 365 Shared Mailboxes.

 

Coordinator
Feb 24, 2012 at 7:47 PM

I've now added dsaunders, Eneuman and mdekkers as developers. Please go ahead and contribute to the project.

Developer
Feb 28, 2012 at 8:50 AM

Hi!

I have now started working on Version 2.0 of CRM Queue Manager.
This version will have full support för CRM 2011 (Both Online and On Premises) with Federated, LiveId, and OnlineFederated environments.

This version will be written in C# using the lastest SDK and LINQ.
CRM 4.0 support might be droped, I will try to keep it if I can.

Stay tuned :)

Developer
Feb 28, 2012 at 9:07 AM

Hi,

That is great news. I will be happy to test this for you against our CRM online version.

Many thanks

Feb 29, 2012 at 6:28 PM

Hi, people!

I need to implement the Queue Manager functionality of convert e-mails in queues automaticaly here in the company I work with "urgency". Any of you know any other way to do it? Paid or not? I may not have time to wait until the development and testing of this project for dynamics 2011. 

Thank you!

Developer
Feb 29, 2012 at 6:58 PM

carlosalmeida,

Here is a VERY similar product that you can buy: http://www.c360.com/EmailToCase.aspx

Developer
Feb 29, 2012 at 8:29 PM
cmerrill wrote:

carlosalmeida,

Here is a VERY similar product that you can buy: http://www.c360.com/EmailToCase.aspx

Hello, I have been in touch with this company and tried the product. It does not seem to be designed for the CRM Online system. At the time I tried, it only supported the on premise version.

I also looked at another product called email2db. They say on the web site that it works with CRM or higher but again I checked and the current version does not support CRM 2011 online. They are planning a new version that will. http://www.email2db.com/action-crm.aspx

I know that does not help you but may save you a bit of time

David

Developer
Mar 1, 2012 at 9:31 AM

Hi

I have just finished implementing CRM 2011 support and will begin testing it today.
I'm going to need a few days to iron out the most obvoius bugs, but as soon as I finished that I will release a public Beta version.

Most of the code is rewritten in C# and uses the new SDK together with LINQ to retrive information :)
I also changed the code so it does not use any obsolute functionallity.
This will make the projekt more future prof.

When we have a stable Version 2.0 of CRM Queue Manager, I'll start implementing caching to make the application handle load better.

Per

Mar 20, 2012 at 11:20 AM

Hi

I have mofified v1.6.1 vb code to almost make it work with CRM 2011. I have tackled all of the issues, but have one left which I wondered if anyone else has encountered.

After creating the case (which it does fine) and disassociating the email from the queue (fine also) it is unable to associate the email with the case. The result is that the email does not appear under the closed activities. The error that the code produces is:

09:10:39 Unhandled exception occurred in ProcessQueue

Exception:
Server was unable to process request.

Details:

  0x80048306
  Cannot update subject or description unless email is in draft status
  Platform

This happens on executing the line in Queuemoniter.vb

'Update e-mail

_objCRM.GetCrmService.Update(objEMail)

I would greatly appreciate any help anyone could offer

Thanks in advance

Mike

Developer
Mar 20, 2012 at 11:38 AM

Hi

You can no longer update a email if the status of the email is different from "Draft".

There is a new function called "Associate" that you can use to associate the email with the new case.

Take a look at http://msdn.microsoft.com/en-us/library/cc155954.aspx for more information.

I hope this helps you.

Regards
Per

 

Mar 27, 2012 at 12:09 PM

Thanks Eneuman. It did. It all works well now.

Regards

Mike