Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM forum
Suggested answer

Trigger a Plugin on Business Process Flow switch

Posted on by 1,004

Hi,

We have 2 business process flows on a custom entity and we want to trigger a plugin when a user switch the BPF. Does anyone know the plugin registration details for this scenario? e.g. which entity to register and what fields, etc.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Trigger a Plugin on Business Process Flow switch

    Hey Sachith,

    Did you manage your problem? How did you achieve to trigger some server side code on BP switch?

  • Suggested answer
    Macoy Profile Picture
    Macoy 275 on at
    RE: Trigger a Plugin on Business Process Flow switch

    Hi,

    You can convert the plugin into a custom workflow activity and use it by creating an ootb workflow then trigger the workflow on field change of Process(proccessid). Or if you dont want to convert into custom workflow activity, you can create a field that will hold the value of the process then a workflow that triggers on create/update of processid field and set value to the field holder, use that field holder as filtering attribute for plugin step on Update message.

    Regards,

    Macoy

  • SCV Profile Picture
    SCV 1,004 on at
    RE: Trigger a Plugin on Business Process Flow switch

    I can't see the processid field among attributes list. Also if I register the plugin on the custom entity update with all attributes selected the plugin does not get triggered. I have enabled tracing.

  • Suggested answer
    Macoy Profile Picture
    Macoy 275 on at
    RE: Trigger a Plugin on Business Process Flow switch

    Hi Sachith,

    Register the plugin step as

    Primary Entity : your custom entity

    Secondary entity: none

    Message: Update

    Filtering Attribute: processid

    Post Operation Synchronous

    Hope this helps.

    Regards,

    Macoy

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,995 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,610 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans