Thursday 26 January 2017

MS CRM - How to find a plugin is synchronous or Asynchronous - SdkMessageProcessingStepMode

At times, we may need to find whether the current plugin step is executing synchronous or asynchronous via code.

We can use the property called mode in IPluginExecutionContext to identify the same.

Code snippet:
IPluginExecutionContext context = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext));
if(context.Mode == SdkMessageProcessingStepMode.Asynchronous)

Monday 23 January 2017

MS CRM Online - #SSRSTip1 - SSRS Fetchxml Data Source and Connection String

Hello All,

Lets learn a quick tip regarding fetch based SSRS report development. With CRM online, FetchXml is the primary option to retrieve data from CRM.

This tip deals with Fetch data source connection string and best ways to avoid issues with connection string.

While developing a new Fetch based report, the fetchxml datasource connection string should be the server URL. In most cases, with server URL the report works as expected.

Ex: https://contoso.crm.dynamics.com



But at times while debugging from local, we may face weird issues like
  • No data retrieved for a valid query
  • Field not available error for a valid query
  • Entity not available error for a valid query
Cause:
Sometimes these fetch data sources may point to some first instance in the group of organizations instead of the one specified in URL.

Fix:
Use the organization unique name with connection string which will fix the issue.

The organization unique name will be available in Developer resources under Settings => Customization

In the following sample, contoso is my org unique name
Ex: https://contoso.crm.dynamics.com;contoso

Hope this helps!