Troubleshooting networking issues

I often run into people in the CRM field who are very good at one or two things, they might be great programmers or a fantastic trainer. However, one of the skills I believe my customers appreciate that I bring to them is not the extreme depth in a certain field but a very good knowledge of many areas all concerning CRM. This ranges from subject as varied as management Consulting to nitty gritty network fixing, or just troubleshooting why that Outlook client won’t work as it should.

And it is in troubleshooting that I think that the breadth of knowledge often does you most value as it helps me to back off from the problem and view it from a different perspective. I also believe that despite the fact that you might have a fancy business card, you should get your hands really dirty to understand what is really going on and what the people are the programmers or technicians are talking about.

And the most important thing about troubleshooting, make sure you have friends, you can never know it all, but with enough friends, there are no limits to what you can know and fix! The best way to get a friend help you in troubleshooting is to help them of course.

I have recently been working a lot with networking and trying to configure RRAS which we use at our lab Environment and I struck a wall and used the Power of social media to ask if there was anyone around that could lend a hand. Thankfully there was, my friend Pete McCollough came back and we met up at a cafe and after some collaborative troubleshooting we found the error and Pete said a wise word that I will remember and would like to share, that being

– Networking is not very complex, but extremely specific

Which he had to explain to me of course as I am only a half-wit. What he meant was that compared to for instance programming Networking is not in its architecture very complex, however, not two systems are identical and usually every component has some part that has been manually configured which turns the troubleshooting hard by trying to find your way around an unknown maze.

In this case I had simply forgotten that our hosting partner had a firewall that blocked 443 and 80 why no traffic got through. I had check the other Three firewalls that the traffic passed about 15 times, but that didn’t matter. I so wished I had a debugger that worked for network traffic.

I was also informed that the following blog ranks this blog among the top 50 CRM blogs in the World which of course is very honouring. Maybe I am not a half-wit after all or maybe just lucky.

http://getvoip.com/blog/2014/06/23/great-crm-blogs

Gustaf Westerlund
MVP, CEO and owner at CRM-konsulterna AB
www.crmkonsulterna.se

Unable to publish all in CRM 2013

I am working with a Customer now who is very savvy an wants to do a lot himself, which I generally encourage as this one of the inherent strengths of Dynamics CRM  and it would be sad to take it away. Of course we need a healthy discussion on where the line should be drawn on where he should stop configuring and I continue. In larger systems, you also need to take sandboxing/QA instancing into this perspective which of course makes it a bit trickier but this Customer is not so large so they can, at least for the time being, do their configuring directly in the system. It is always a matter of weighing the costs against the benifits.

However, we suddenly ran into a problem when we couldn’t run “Publish All” any more. It just showed a dialog with a cryptic message mentioning object with id [1] missing.

My first thought was that this must be in relation to one specific entity so I started trying to publish one entity at a time (starting with the ones we have changed a lot) and I quite quickly noticed that I got an error when trying to publish Opportunity but not other entities.

I then created a new solution, added Opportunity to this and included all dependencies, and made sure to publish all dependencies Before trying to publish Opportunity, just to make sure that there wasn’t some error in CRM:s causality of publishing. After doing this, I finally go an error message which said something useful, it said that a saved Query of a specifc GUID was missing. This probably meant that this Query was being used on a form in a subgrid and had been removed and when trying to publish, it would not, as the view did not exist.

I opened the form, went through all the subgrids and made sure that the selected view was an existing selection, saved and published the form and it worked. After this publish all also worked.

So the general conclusion is that you should be careful when deleting views as these might be used in subgrids, and the second conclusion is that Microsoft hopefuly will add a dependency blocker that disallows the deletion of a view that is being used in a subgrid.

Gustaf Westerlund
MVP, CEO and owner at CRM-konsulterna AB
www.crmkonsulterna.se

Issues with the new Plugin Registration tool

As you might have noticed there is a new version of the plugin registration tool out with the new version of the SDK 6.1 released in may 2014. It has gotten a nice facelift in the UI and can now be found in the Tools directory.

However, I have had some issues when working with my on-premise org (it worked fine with online). I got the following error when trying to register a step on a plugin assembly.


Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Assembly file name (CRMKonsulterna.Modelon.Plugins.dll) is in invalid format. Only file name is allowed.
Detail: <OrganizationServiceFault xmlns=”
http://schemas.microsoft.com/xrm/2011/Contracts” xmlns:i=”http://www.w3.org/2001/XMLSchema-instance“>
  <ErrorCode>-2147204719</ErrorCode>
  <ErrorDetails xmlns:a=”
http://schemas.datacontract.org/2004/07/System.Collections.Generic” />
  <Message>Assembly file name (CRMKonsulterna.Modelon.Plugins.dll) is in invalid format. Only file name is allowed.</Message>
  <Timestamp>2014-05-30T06:58:51.0596986Z</Timestamp>
  <InnerFault>
    <ErrorCode>-2147204719</ErrorCode>
    <ErrorDetails xmlns:a=”
http://schemas.datacontract.org/2004/07/System.Collections.Generic” />
    <Message>Assembly file name (CRMKonsulterna.Modelon.Plugins.dll) is in invalid format. Only file name is allowed.</Message>
    <Timestamp>2014-05-30T06:58:51.0596986Z</Timestamp>
    <InnerFault i:nil=”true” />
    <TraceText i:nil=”true” />
  </InnerFault>
  <TraceText i:nil=”true” />
</OrganizationServiceFault>

Server stack trace:
   at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at Microsoft.Xrm.Sdk.IOrganizationService.Create(Entity entity)
   at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.CreateCore(Entity entity)
   at Microsoft.Crm.Tools.PluginRegistration.RegistrationHelper.RegisterStep(CrmOrganization org, CrmPluginStep step)
   at Microsoft.Crm.Tools.PluginRegistration.StepRegistrationForm.btnRegister_Click(Object sender, EventArgs e)

I’m including it all here for searchability. I have highlighted the message that is the interesting part.

When retrying it in the older version of Plugin Registration tool, it works just fine, as long as I re-register the assemblyfile. If I keep the assembly file and try to register the step in the older version (6.0.0001.0061) I will still get the error, so I did have to unregister the entire assembly and register it all over. This also only seems to show up when registering to disk (I havn’t tried registereing to GAC as I seldom use that).

Also do note that despite right clicking on the assembly-plugin and pressing “Add step” it seems to omit this information in the form for registering the step so make sure that your step is registered on the correct assembly. I got a bit confused and registered quite a few on ActivityFeeds until I noticed this.

For reference, this is for Plugin Registration Tool version 6.1.0.519 and I am testing it on CRM 2013 UR2 Onpremise.

I am also quite sure these bugs will be fixed soon by Microsoft, but it might be a good idea to keep a copy of the older Plugin registration tool just in case.

Gustaf Westerlund
MVP, CEO and owner at CRM-konsulterna AB
www.crmkonsulterna.se

Server side Sync Trouble shooting

I have been working with a Proof-of-concept for the lates couple of Days and have been setting up the server side sync for a CRM on-premise system. First of all I would just like to share that it is a really nice new feature, I really like the fact that we now can have an option to not have to use the email router. With the new spring release, it will also be available for CRM Online, but only CRM-Online to Exchange Online (O365) not hybrid Environments (ex. CRM Online to Exchange on-premise or vice versa).

However, I did run into some issues as none of the emails that I sent to the email account connected to the queue showed up in the queue.

The Server Sync is handled by the MSCRMAsyncService and if you switch on logging in CRM (which can be done using adding the registry key “TraceEnabled” and setting it to 1 or using Power Shell)  you will get the logging of the server sync in the async tracing loggs. It turned out that I had a missmatch in email addresses which CRM apparently didn’t like and you can only have one email address for a queue, but it was easily fixed once I knew the problem. I just wonder how I would troubleshoot this if I got this in CRM Online… hopefully MSFT will be adding additional logging to the server sync functionality.

Gustaf Westerlund
MVP, CEO and owner at CRM-konsulterna AB
www.crmkonsulterna.se