web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

plugin registration question?

(0) ShareShare
ReportReport
Posted on by

Hello - I'm using the pluging registration tool (pluginregistration.exe) to view the plugins that are already associated with a CRM installation.

When I right-click on an existing plugin assembly through the tool and select "Register New Step" from the context menu the UI displays options like "Pre-operation" and "Post-operation."

However, when I try to view the details of an existing plugin, the tool does not seem to show the pre/post info. I'm only able to view the details in the details grid at the bottom of the tool. 

Is there a way to view more details for existing plugins (like pre/post info) in the same detail UI provided for the registration of new plugin steps?

*This post is locked for comments

I have the same question (0)
  • nick.doriot Profile Picture
    10 on at

    If there are additional plugins/steps registered under a particular assembly you will be able to expand the tree for that particular item and it will show the registered plugins/steps.  If you double-click a particular step it will bring up the same dialog that you see when you register a new step.  You can also see the details for any particular assembly/plugin/step in the details pane on the right side of the plugin registration tool when you click an an item.

  • FidelMartin Profile Picture
    128 on at

    By using Plugin Registration’s Pre-Validation stage, we can validate or modify before the main operation occurs. Pre-validation stage will occur before the main operation executes.

    Here, we have given one example of how we can use the Pre-validation stage in plugin registration tools.

    For Example, we have given the Pre-validation on the Account entity, so whenever any account record is updated, it will update the Fax number as shown below.

    Follow the below steps :

    Step 1: Add the below code in your code editor for the plugin.

    using System; using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using Microsoft.Xrm.Sdk;
    namespace Plugindemo
    {
    public class Prevlidationclass : IPlugin
    {
    public void Execute(IServiceProvider serviceProvider)
    {
    ITracingService tracingService =
    (ITracingService)serviceProvider.GetService(typeof(ITracingService));
    IPluginExecutionContext context = (IPluginExecutionContext)
    serviceProvider.GetService(typeof(IPluginExecutionContext));
    if (context.InputParameters.Contains("Target") &&
    context.InputParameters["Target"] is Entity)
    {
    Entity entity = (Entity)context.InputParameters["Target"];
    try
    {
    if (entity.LogicalName == "account")
    {
    if (entity.Attributes.Contains("fax") == false)
    {
    entity.Attributes.Add("fax", "1122344343");
    }
    }
    }
    catch (Exception Ex)
    {
    //tracingService.Trace("Myplugin:{0}", Ex.ToString());
    throw new NotImplementedException(Ex.Message);
    }
    }
    }
    }

    Step 2: Now open the Plugin Registration Tool and connect the CRM where you want to add pre-validation operation.

    After connecting to the CRM, Click on Register, and there will be a label as Register New assembly.

    Step 0000s2
     

    Step 3: After clicking on Register New Assembly, it will open a pop-up to register assembly, in that pop-up, click on 3 dot (…) and select the .dll file for your project.

    Step0000s3
     

    After selecting the dll file, check the Select all checkbox and click on the Register Selected Plugin button.

    Step 4: Next, locate the assembly and add a new step by clicking the Register New Step.

    Step0000s4
     

    Step 5: Now, to register the new step, it will open a pop-up.

    Keep value as given below :

    Message: Update.

    Primary Entity: account

    Event pipelinestage of execution: Prevalidation step should be chosen.

    Step0000s5
     

    Note as this is pre-validation, it needs to be synchronous and cannot be asynchronous. After filling in the above details, click on the Update Step button.

    Step 6: Now, we can test this. On an account record, insert a fax number:

    Step0000s6
     

    Step 7: After saving and refreshing, we can see that our plugin has replaced the fax number. So whenever any account record is updated, it will update the fax number for that record.

    Step0000s7
     

    This is how a user can use the Pre-validation stage in the Plugin Registration tool to validate or modify something by plugin registration tool.

    If you have any concern related to this query please contact us.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans