Showing posts with label #MSdynamicsplugindevlopment. Show all posts
Showing posts with label #MSdynamicsplugindevlopment. Show all posts

Friday, 13 May 2016

Plugin Debugging using Profiler in CRM 2016

Steps for Debugging:


  1. Connect to CRM with SDK plugin registration tool.
  2. Install the profiler by clicking 'Install Profiler'.

   3. A new branch is added to Register Plugin and workflow activities.


4. Select a plug-in step and click Start Profiling in the toolbar to begin profiling. Below screen pop up, click OK.


5. Perform the operation in CRM that causes the plug-in to run.



 6. Click on Download Log File button to save the ErrorDetails.txt file on  computer.

7. Open the plug-in solution in Visual Studio and go to Debug  --> Attach Process and select       
    PluginRegistration.exe, Click Attach button.


8. In Plug-In Registration Tool, click the Debug button. Select ErrorDetails.txt for the profile location and browse assembly location to debug.



10.  Click the Start Execution button, and debugging will start in Visual Studio.




Thursday, 12 May 2016

MS Dynamics CRM Plug-In Development


  • To develop a plug-in, download the Microsoft Dynamics CRM 2016 SDK
  • Create new class library project in VS

  • Add reference of 2 dll
              1. Microsoft.Xrm.Sdk.dll
              2. Microsoft.Crm.Sdk.Proxy.dll
  • Adding Refrence
  1. Solution Explorer --> select the project name --> Rightclick and select the Add Reference menu option

   2. Click the Browse button.
   3. Locate the SDK\Bin folder on your local drive and select both Microsoft.Xrm.Sdk.dll and
       Microsoft.Crm.Sdk.Proxy.dll files.


   4. Added dll will show under Refrence folder.


5. Add namespace and implement IPlugin interface.



6. In the case of the IPlugin interface,  implement the Execute method is must.

  public class Class1:IPlugin 
    {
        #region IPlugin Members
        public void Execute(IServiceProvider serviceProvider)
        {
            throw new NotImplementedException();
        }
        #endregion
    }