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
    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
    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
    Mahone 62 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
    Chandu Reddy 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
    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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

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

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans