Clients often ask us to customize their CRM implementation beyond the original out of the box capabilities. There are many options you can use as a developer to eXtend CRM (xRM). For the sake of this blog, we'll focus on plugins; and in particular how to circumvent an issue when working with Plugin Profiler.

Case Study:

I was working on Dynamics CRM 2013 online version and was using Visual Studio 2012 developer tools for deployment in Dynamics CRM 2013. I created a plugin with the help of Visual Studio developer tools and had registered my plugin through the Visual Studio developer tools, which is a fast and easy process. When I was working with the plugin I was getting the unexpected error shown below in the execution of the plugin:

"”<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><s:Fault><faultcode>s:Client</faultcode><faultstring xml:lang="en-US">Download the details and load with Plug-in Profiler.&#xD; |7L0HYBxJliUmL23Ke39K9UrX4HShCIBgEyTYkEAQ7MGIzeaS7B1pRyMpqyqBymVWZV1mFkDM7Z28995777333nvvvfe6O51OJ/ff/z9cZmQBbPbOStrJniGAqsgfP358Hz8iHv8e7xZlepnXTVEtP/tod7zzUZovp9WsWF589tFXb55tH3yU/h5Hj1/lq6puU2q8bB4Vn300b9vVo7t3r66uxlf3xlV9cXdvZ2f37u/9xfPX03m+yLaLZdNmy2n+0dHjk2p5Xlys66ylPtLi0bIoP/uordf5R3f5y4Z+n7ZV/VSbnC2/KMqyaPJptZw1R/uP797cyIdz+m6ar27o63Wb1e2bYpEf7e3s3t/e2d3eO3ize//RvYNH9x+M9z/d2d25/+Cngp7dKwDU5u/ao19Ytoe3IuAvvGgP0fgHj7Ll9ZvrVU6otfTjs49eluuLYnn6Lp+ugbJC/kgp/QNL6YbJ2owXxbSumuq8HU+rBYh+7+7uzt3XeV1kZfEDJs1d8/Z7zZNB8cm6KZZ503y1LNqzGT4938/2H+T5zvbu/sPpdr6/u7t9kD2cbX86vTfJ72cHewf3DvDm3f6r+Pikquu8lEnjDz/d+fTgwacHO9v3pvv59v7DB9n2wXT34fa980+nD/bP7+1ns32G13sTnz6luZ3jj11uY//EX2fUcUHtlxdfNXkt7xzs5DuTBw8n29nurmI/uX/vvsV+Z/dAeou9LEBX6/ZlVmeLvKVpVtpmN8zMuxqzs7sLDmrrbNo2ZlYmvTdnWZtNtZmZo/27Ow/uvr5u2nwxPqnKMp+CDM3483xJcz396K5""

I tried to investigate the exceptions to find out what the error was, but I was unable to figure it out. My code was running fine and there were no mistakes.Then I realized that earlier to debug my plugin I tried to use the plugin registration tool and in this process I executed profiling of the plugin. Debugging through the plugin registration tool was not successful because I was unable to generate log file, but in this process the plugin got profiled. I thought this error was happening because something was wrong with the profiling.

Resolution:

To resolve this error I removed the profiling from the plugin, and after removing the profiling I found the plugin to be working fine. Follow the steps below to remove profiling from your plugin if you are facing the same issue:

 1. Run PluginRegistration.exe and connect Dynamics CRM instance with Plugin registration tool.

 2. After clicking on Create New Connection fill in all the information and click on Login.

 3. Once you are logged in, you will see all of the plugins which are registered under your organization.

 image

 4. To remove profiling from the plugin, click on uninstall profiler (this option is enabled once profiling for one of the plugins is completed).

 5. Once I uninstalled the plugin profiler from the plugin, and deployed the plugin through Visual Studio developer tools, it started working fine.

Hope that this information is helpful for those who are developing plugins for Microsoft Dynamics CRM 2013 Online. For more information about this blog or C5 Insight, Contact Us.