Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer Service forum

How to trigger plugin on stageid changed from BPF

(0) ShareShare
ReportReport
Posted on by 1,088

Hi, partners is there a way to use "Filtering Attributes"  the stageid of Business Process Flow from an entity (opportunity) and on stage changed to trigger a plugin. that attribute does not appear. does anyone have a recipe or workaround to do this? but no WF...

regards

Dynamics 365 V9. CE

Categories:
  • LeoAlt Profile Picture
    16,331 Moderator on at
    RE: How to trigger plugin on stageid changed from BPF

    Hi partner,

    If  you mean you want to trigger workflow when changing stages in bpf, there are 2 ways for you.

    1. Create an on-demand workflow and trigger it in your bpf stage.

    You could refer to my another answer here.

    https://community.dynamics.com/365/f/dynamics-365-general-forum/365180/create-a-call-workflow-on-business-process-flow---can-it-open-the-quick-create

    2.You could use js code with the following 2 steps to do this.

    Step 1.

    Listen the stage changes in your bpf and trigger js functions when changing the bpf stages.

    https://docs.microsoft.com/en-us/powerapps/developer/model-driven-apps/clientapi/reference/formcontext-data-process/eventhandlers/addonstagechange

    https://community.dynamics.com/crm/b/crmandunifiedservicedesk/posts/javascript-add-code-on-business-process-flow-change-and-select

    Step 2.

    Trigger workflow with web api.

    https://carldesouza.com/calling-a-dynamics-365-workflow-through-javascript/

    Hope it helps.

    Best Regards,

    Leo

  • Community Member Profile Picture
    on at
    RE: How to trigger plugin on stageid changed from BPF

    I haven't tried this before but what about you run the plugin step on the entity of the BPF and not the opportunity entity? There is an Active Stage field there that you can set as the filtering attribute.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Customer Service

Featured topics

Product updates

Dynamics 365 release plans