Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

How to invoke plugin by clicking custom button placed on form using html web resource?

Posted on by 515

Hello,

I have placed custom button on Form using web resource. I want to invoke plugin logic (c# code) when user clicks the button on form.

is it possible to do so?

Regards,

Ashish

*This post is locked for comments

  • Suggested answer
    Nithya Gopinath Profile Picture
    Nithya Gopinath 17,074 on at
    RE: How to invoke plugin by clicking custom button placed on form using html web resource?

    Hi Ashish,

    There are two ways.

    1.  You could try using a dummy entity and create a record of the same using javascript. Register the plugin on the post-creation of the dummy entity record. See: scaleablesolutions.com/crud-operations-using-microsoft-dynamic-crm-web-api/
    2. You could also try creating an action and call the action using javascript. Note that actions can be called in javascript using Web API or Process.CallAction() method in process.js library or SoapLogger.Register the plugin message as the name of the action. See the links below.

    See the community thread below.

    community.dynamics.com/.../184588

    Hope this helps.

  • ashlega Profile Picture
    ashlega 34,475 on at
    RE: How to invoke plugin by clicking custom button placed on form using html web resource?

    You can't invoke a plugin - you can do it with a workflow/customaction.. as for the plugin, you can invoke it "indirectly" (although, there is, probably, no need to do so given you have those other options) - put a hidden field on the form, add it as a trigger for the plugin step, then use javascript to update that field and save the changes. 

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: How to invoke plugin by clicking custom button placed on form using html web resource?

    Hello,

    I would suggest you to use WebApi to call it:

    dynamicscrmcoe.com/how-to-call-an-action-through-the-dynamics-crm-web-api

    debajmecrm.com/.../invoke-your-custom-action-from-dynamics-crm-web-apidynamics-crm-2016

  • Suggested answer
    Gopalan Bhuvanesh Profile Picture
    Gopalan Bhuvanesh 11,397 on at
    RE: How to invoke plugin by clicking custom button placed on form using html web resource?

    Hi

    You can invoke an Action which would trigger a plugin.

    processjs.codeplex.com

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans