Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Sales forum / Change BPF according t...
Sales forum
Suggested answer

Change BPF according to selected field option

Posted on by 35
Hello,
 
Does someone has idea how to solve next question.
We created Field with different sales procedures and want to link these options to actual business process flows.
Yes it would be simple to BPF from process menu but we do need field in different views to get quick idea of what process is being used.
Also its more efficient/comfortable to fill and select all fields on same place not navigate around in menus and submenus.
 
Thanks in advance.
  • Leah Ju Profile Picture
    Leah Ju Microsoft Employee on at
    Change BPF according to selected field option
    Hi Partner,
    Has the issue been resolved?
    Have there been any updates? Please feel free to ask me any questions you may have!
    If it has been resolved, can you mark the response as an answer?
  • Suggested answer
    Leah Ju Profile Picture
    Leah Ju Microsoft Employee on at
    Change BPF according to selected field option
    Hi Partner,
    You can switch different BPFs based on the field value through Javascript automatically.
    1.setActiveProcess()
    Sets a Process as the active process.
    If the business process being set as active already has an instance, the instance will be marked as active and the primary record form will be reloaded to show it.
    formContext.data.process.setActiveProcess(processId, callbackFunction);
    2.getActiveProcess()
    Returns a Process object representing the active process.
    var activeProcess = formContext.data.process.getActiveProcess();
    3.process.getId()
    Returns the unique identifier of the process.
    var processId = procObj.getId();
    And you can refer to the following blog, which provides one example:
    Note:
    Pick GUID of the Business Process Flow 32 characters between %7b and %7d  (%7b    BAA0A411-A239-410C-B8BD-ED8B5FDD88E3   %7d)

    I hope you can verify my answer if it helps you! If you have any questions, please feel free to contact me.
    Regards,
    Leah

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

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

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,263 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,112 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans