Category Archives: Plugin

Automate ILMerge for Workflows/Plugins to Merge Multiple Assemblies into One in Dynamics 365

Introduction: Recently we got a business requirement where we need to merge two assemblies into single exe i.e. one .net assembly and another assembly which would serialize and deserialize, so we used Newtonsoft.Json.dll for it. To merge Newtonsoft.Json.dll with .net dll in single exe it is recommended to use ILMerge. ILMerge is a tool that can… Read More »

Fixed – “Unable To Load Plug-in Assembly” Error in Dynamics 365

Introduction: Recently we had a business requirement where we created plug-ins and asynchronous workflows for ON-Premise CRM and in the plug-ins, we used some third party dll like Newtonsoft.Json.dll. But when we tried to register the plug-ins using ILMerge approach, the third party dlls did not get merged with plugin dll and other required dlls.… Read More »

Fixed – AADSTS90100: Invalid request. The Accept request parameter value ‘application/x-www-form-urlencoded’ is invalid

The introduction of Representational State Transfer (REST) service has allowed us to remotely interact with SharePoint data and perform basic operations like Create, Delete, Read and Update on SharePoint folders and files. When we use REST, we don’t need to add any references to libraries or client assemblies in SharePoint. In one of our earlier… Read More »

Unable to connect IFD CRM using Plugin Registration Tool

When we setup IFD configuration for Dynamic 365 it doesn’t always go smoothly. Sometimes, after configuring IFD, the CRM connects through the web client, but it does not connect using Plugin Registration Tool. The below message is displayed while connecting CRM using Plugin Registration Tool: We have faced this issue many times and have found various solutions!… Read More »

Plugin Pre-validation Operation to Show an Error Message as well as Log the Error

Introduction: We had a business requirement, where we created a custom entity with a grid of Associated Accounts. Here, we wanted to restrict the Account while adding Accounts in the Associated View. We wanted to do this when the Account does not have the status reason ‘Approved’ by showing an error message and sending an… Read More »

Watch out for Issues with Version & Updating Plug-in assembly in Dynamics 365/CRM

Introduction: Plugin Assemblies are versioned and need to be signed with a strong key for them to be registered to Dynamics CRM. Any update to the library and compiling the project may cause the version # to change or to maintain versioning practices you may decide to change the version # and this can cause… Read More »

Retrieve Absolute and Site Collection URL Request in Dynamics CRM

In Microsoft Dynamics CRM, many emails and notes along with attachment gets created on daily basis, which results into increase in the CRM database storage which is expensive. So usually, people go with the integration of Dynamics CRM with SharePoint which reduces the CRM database storage. We receive many such requests where client wants to… Read More »

Working with JSON objects in Dynamics CRM Plugins

While working with Dynamics CRM plugin, we encountered a scenario where we were calling a Web API, which returns data in JSON format. Normally .NET framework provides many methods to use JSON in C# code, many third party solutions such as Newtonsoft.Json library are available. Mostly we use JavaScriptSerializer to read JSON data. However, when we register… Read More »

Change Createdby/Modifiedby Field at Runtime in Dynamics CRM Plugin

Recently we came across a scenario where we were assigning CreatedBy and ModifiedBy field of the record that was created by plugin dynamically based on the data of the record that was getting created by plugin. Let us say, my Contact entity that has field “new_createdby”, ”new_modifiedby” and its records are getting created by plugin.… Read More »

Use RetrieveDuplicateRequest in Dynamics CRM

Introduction: Recently we had a requirement where we had to create Contact records from data received from other System and if Duplicate record found then avoid creation of records based on Duplicate Detection rules specified in the System and get the List of the Duplicate Records found in the system. The Duplicate Detection rules might… Read More »

ExecuteMultiple & Workflow or Plugin Assemblies

Introduction: ExecuteMultipleRequest – Message that allows you to club multiple CRM operations and execute them at one go without having to send each of these as separate requests. The ExecuteMultiple provides you with the option to indicate whether you want to continue processing the remaining requests if one of them fails or to stop processing. But… Read More »

Price List selection logic available starting Dynamics CRM 2015 Update 1

Introduction Traditionally Price List in any of the transactions like Opportunities, Quote, Orders or Invoices was set by reading it from Customer. If there was no price list set for the customer, it would be left blank and the user would be required to set it manually. Price List is critical and needs to be… Read More »

Querying More than 5000 records in Dynamics CRM

Introduction: There are multiple ways provided in Dynamics CRM SDK to query and read data like Using ODATA Using FetchXML Using Query object ODATA has a limitation where it can return only 50 records at a time. You can ofcourse query more than that but it would be in batches of 50 records at a… Read More »

Plug-in Tracing in Dynamics CRM 2015 Update 1

Before CRM 2015 SP1 update, an alternative option to debug the Plug-in or Workflow for developers was to use tracing messages which would help to trace the program using custom messages. The developer had to manually throw an exception in order to trace the program. And then when the plug in/workflow is triggered a dialog is… Read More »

Use Tracing in CRM 2011 Plugins

CRM SDK provides way for you to include the debug details about your plug-in in case you need to trace the plug-in execution. For this you will have to initialize the “ITracingService”. The service provides way to trace the details and display it whenever plug-in fails and throws an exception. //Initialize the serviceITracingService tracingService =… Read More »