Wednesday, January 22, 2014

MS CRM 2013: How to fix ‘sdkmessage With Id = {} Does Not Exist’ error

This error appears when you are trying to import solution that contains plugin(-s) that handle Action(-s) from one environment to other environment:


In Log file and trace file you can find description of error similar to following:
sdkmessage With Id = a79cef5c-dd82-e311-a344-0800272ad985 Does Not Exist

Source of issue is that Ids of SdkMessage

This issue is well-known, registered on Connect but haven’t been fixed yet.

This article describes workaround that will allow to import such solution.

Sunday, January 19, 2014

MS CRM 2013: Issues uploading report to CRM Online

Today I faced with really weird issue with Report developed for CRM Online. Report worked fine both at BIDS and my test On-Premise instance but once I’ve tried to upload it to productive instance I have got following error:


I’ve downloaded description file but error log didn’t contain any helpful information:

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: 
An error occurred while trying to add the report to Microsoft Dynamics CRM. Try adding the report again. If this problem persists, contact your system administrator.Detail: 
<OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
  <ErrorCode>-2147188072</ErrorCode>
  <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
  <Message>An error occurred while trying to add the report to Microsoft Dynamics CRM. Try adding the report again.
    If this problem persists, contact your system administrator.</Message>
  <Timestamp>2014-01-19T20:15:50.4036673Z</Timestamp>
  <InnerFault i:nil="true" />
  <TraceText i:nil="true" />
</OrganizationServiceFault>

After that I’ve opened SDK for CRM and found this article that describes limitations of reports in CRM Online. I went through all used formulas and replaced parts that used Equals and Decimal.Zero.

So my suggestion in case you have problems uploading report to CRM Online:

1. Recheck that your report uses Fetch Xml DataSource.
2. Recheck all formulas that you have in your report and remove (or replace) all denied types and denied members.
3. Ensure that your report doesn’t use references to any assemblies.

Sunday, January 12, 2014

MS CRM 2011/2013: Open new email form with To and Regarding fields prefilled

About a year ago I wrote small article how to open new activity form with Regarding field prefilled.
This week I had a similar task but this time I had to write a JavaScript that will open email form with To field prefilled. So here is the script that you can use:
function OpenEmail(recordid, recordtypecode) {
    var params = "pId=" + recordid + "&pName=&pType=" + recordtypecode;
    params += "&partyid=" + recordid + "&partyname=&partytype=" + recordtypecode;
    var url = "/main.aspx?etc=4202&pagetype=entityrecord&extraqs=" + encodeURIComponent(params);
    url = Xrm.Page.context.prependOrgName(url);
    window.open(url);
}

Here is sample of usage:

OpenEmail("c8576fa9-155e-e311-bbc5-6c3be5a8d218", 2);

This small JavaScript will open new email form with Regarding and To fields prefilled with contact with Id that equals to "c8576fa9-155e-e311-bbc5-6c3be5a8d218".

Thursday, January 09, 2014

Microsoft CRM 2011/2013: Colorizing Service Calendar

This is how standard service calendar looks like:

Today I was asked with customer is it possible to change colorizing schema of Service Calendar. I started to look for information about it and found following article - http://msdn.microsoft.com/en-us/library/gg309501.aspx
Unfortunately I was not able to understand now to make it from first attempt and I contacted Microsoft to get some clarification and help. I’m really appreciated to Jim Daly who got in touch with me and gave some explanations regarding SDK article. I will share with results I've got in this article.

Friday, January 03, 2014

MVP Renewed – 4

Fifth year in a row I have got MVP award. Congratulations to all MVP's who has got award first time or was re-awarded.