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)

Is it possible to trigger a plugin using JavaScript.

(1) ShareShare
ReportReport
Posted on by 6

Hello All,

I need to run a plugin when user clicks a custom button on the form.

is there any possibility that we can trigger a plugin using JavaScript??

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    pavanmanideep Profile Picture
    1,331 on at

    Hi,

    Yes,it's possible. You can refer to the below 2 posts for reference.

    https://community.dynamics.com/crm/b/mileyja/archive/2011/11/08/how-to-trigger-a-plug-in-from-jscript-in-microsoft-dynamics-crm 

    https://debajmecrm.com/2014/08/03/call-plugin-from-javascript-in-microsoft-dynamics-crm/ 

    Hope this helps!

    Thanks,

    Pavanmanideep

  • Suggested answer
    Rajkumar Rajaraman Profile Picture
    on at
  • Suggested answer
    Gopalan Bhuvanesh Profile Picture
    11,401 on at

    Add Process.js library to webresource.

    Create Action with input and output (if needed). By default you would get the Target from the input parameter collections. You can use this.

    You do not need to add any stage here, if you are using just to invoke the plugin.

    Message would be Post Action message for your above custom action.

    Please check these as well

    community.dynamics.com/.../231065

  • Mridula Profile Picture
    275 on at

    Hi,

    On click of a button, you can call a JS which in turn will call an Action. On Action message , you should register plugin.

    Thanks,

    Mridula

  • Suggested answer
    CRASH Profile Picture
    2 on at

    Hi

    1.) Create a Boolean.

    2.) From javascript of custom button, change its value.

    3.) Save record from javascript.

    4.) Register your plugin on update of record, with created Boolean as filtered attribute.

    5.) In plugin check for boolean's required value before execution.(Optional)

    6.) Reset Boolean in last steps of plugin.(Optional)

  • Saddamk206 Profile Picture
    777 on at

    Hi, We can do same using below blog:-

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