I would like for the case subject to automatically change from “Not Started” to “In Progress” once I have completed the first Business Process Flow stage of a case.
Case status automatically change to In progress when 1st BPF is completed
I would like for the case subject to automatically change from “Not Started” to “In Progress” once I have completed the first Business Process Flow stage of a case.
Case status automatically change to In progress when 1st BPF is completed
Hi Partner,
Has the problem been solved? Any updates?
Please click Yes under "Did this answer your question?" to close this thread.
Thanks.
Regards,
Leah Ju
Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.
Hi Chandu,
You just modify condition in js code:
Original condition:
if (stagename == "Research") //stage2 name
Modified condition:
if (stagename == "Research" || stagename == "name2" || stagename == "name3" || stagename == "name4" || stagename == "name5" || stagename == "name6") //stage2 name for different BPF
Regards,
Leah Ju
Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.
You can do this with a workflow created on the BPF entity. When the active stage changes, update the related case. Use the conditions to do the mapping from the BPF stage to the Case Status reason.
Thank you Leah Ju.
We have 6 BPF and stage 2 is different for each BPF. Can this also achieve via workflow rules using field update option?
Hi Chandu,
You can use javascript to change case status based on BPF process step.
Here are steps.
1.Js code.
function formonload() { Xrm.Page.data.process.addOnStageChange(changeStatus); // Trigger the function when move to next stage. changeStatus(); } function changeStatus() { var activeStage = Xrm.Page.data.process.getActiveStage(); var stageId = activeStage.getId(); var stagename = activeStage.getName(); if (stagename == "Research") //stage2 name { Xrm.Page.getAttribute("statuscode").setValue(1);//In Progress } }
2.Add js to web resource.
Go Settings > Customization > Customize the System > Web Resources.
3.Add js to OnLoad event of the case form.
(1) Go Settings > Customization > Customize the System > Entities > Case > Form.
Open the main form and click ‘Form Porperties’.
(2) In ‘Form Porperties’ dialog.
(3) Save and publish all customizations.
4.Test.
(1) BPF stage1:
(2) BPF stage2:
Regards,
Leah Ju
Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.
André Arnaud de Cal...
292,516
Super User 2025 Season 1
Martin Dráb
231,409
Most Valuable Professional
nmaenpaa
101,156