Notifications
Announcements
No record found.
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 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.
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?
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.
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
Hi Partner,
Has the problem been solved? Any updates?
Please click Yes under "Did this answer your question?" to close this thread.
Thanks.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Tom_Gioielli 55 Super User 2025 Season 2
Daniyal Khaleel 27 Most Valuable Professional
Soundari 15