Search code examples
pluginsdynamics-crmmicrosoft-dynamics

Dynamics CRM Plugin or Extension


I've been following some tutorials to develop a plugin for Dynamics CRM but based on my requirements it seems like it's not what I'm looking for.

    public void Execute(IServiceProvider serviceProvider)
    {
        //Extract the tracing service for use in debugging sandboxed plug-ins.
        ITracingService tracingService =
            (ITracingService)serviceProvider.GetService(typeof(ITracingService));

It seems above code provides some hooks to post events and interaction within dynamics, what area should I look under if I wanted to embed a custom HTML with content populated via XHR within the regions of Dynamics UI, let's a subsection within the lead? Also getting some contextual information Dynamics UI fields.


Solution

  • You are right. Plugin is for extending execution pipeline in server side transaction.

    What you want is Web resource of HTML type, which you can embed in the Lead form.

    SO thread to read.

    GetGlobalContext function inside HTML web resource will give you the access to context & controls of Lead record (name & email) after referencing ClientGlobalContext.js.aspx. No need to pass name & email manually, though you can send them using querystring to HTML on load with setSrc.