Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Suggested answer

Change case status based on BPF process step

(0) ShareShare
ReportReport
Posted on by 10

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.

pastedimage1605701674010v1.png

Case status automatically change to In progress when 1st BPF is completed 

pastedimage1605701752510v2.png

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Change case status based on BPF process step

    Hi Partner,

    Has the problem been solved? Any updates?

    Please click Yes under "Did this answer your question?" to close this thread.

    pastedimage1605866376879v1.png

    Thanks. 

    Regards,

    Leah Ju

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Change case status based on BPF process step

    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.

  • Suggested answer
    Mahone Profile Picture
    64 on at
    RE: Change case status based on BPF process step

    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.

    Screenshot-2020_2D00_11_2D00_19-104434.png

  • Chandu Reddy Profile Picture
    10 on at
    RE: Change case status based on BPF process step

    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?

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Change case status based on BPF process step

    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.

    pastedimage1605754387856v3.png

    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’.

    pastedimage1605754380813v2.png

    (2) In ‘Form Porperties’ dialog.

     pastedimage1605754372719v1.png

    (3) Save and publish all customizations.

    4.Test.

    (1) BPF stage1:

     pastedimage1605754457530v4.png

    (2) BPF stage2:

    pastedimage1605754494964v5.png

    Regards,

    Leah Ju

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 Forums.

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

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 51 Most Valuable Professional

#2
Ramesh Kumar Profile Picture

Ramesh Kumar 42

#3
David Shaw_UK Profile Picture

David Shaw_UK 27

Featured topics

Product updates

Dynamics 365 release plans