web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Answered

system entity stage skip in BPF based on a field value in Customer service module.

(3) ShareShare
ReportReport
Posted on by 15
Scenario - based on an optionset value in the first stage of BPF , i want to skip the next stage in bpf .
 
i am working on Case entity main form where it was configured with a BPF "phone to case" , i have added a custom field which is optionset in to the main form and added the same in stage 1(Identify) of BPF.. As per my scenario i need to skip to Resolve Stage when skillSet=javascript.  i have written some js code but its not working as expected .here is the code 
function AdvanceBPF(executionContext) {
    var formContext = executionContext.getFormContext();
    var skillSetVal = formContext.getAttribute("crbaa_skillset").getValue();
    var Stage1 = "15322a8f-67b8-47fb-8763-13a28686c29d";
    var Stage2 = "43705509-726f-499c-9351-6058f9139011";
    var Stage3 = "14f57c64-2bcd-4146-be63-abf69d29a2de";
    
    var entity = {};
    entity["activestageid@odata.bind"] = "/processstages(" + Stage2 + ")";
    entity["traversedpath"] = Stage1 + "," + Stage2;
    var BPFId = "47c0f979-8275-ef11-a670-000d3ac893ab";
if(skillSetVal==878810000){
    
    var req = new XMLHttpRequest();
    req.open("PATCH", Xrm.Utility.getGlobalContext().getClientUrl() + "/api/data/v9.2/phonetocaseprocesses(" + BPFId + ")", true);
    req.setRequestHeader("OData-MaxVersion", "4.0");
    req.setRequestHeader("OData-Version", "4.0");
    req.setRequestHeader("Accept", "application/json");
    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
    req.onreadystatechange = function() {
        if (this.readyState === 4) {
            req.onreadystatechange = null;
            if (this.status === 204) {
                alert("Success");
            } else {
                alert("Error");
            }
        }
    };
    req.send(JSON.stringify(entity));
}
else{alert("Not Moved the stages")}
     
}
Can Some one guide me how to skip the stage .
I have the same question (0)
  • Verified answer
    gulshankhurana Profile Picture
    15 on at
     
    I'm not into code so here's my suggestion for achieving it in a no-code, out-of-the-box way:
     
    Create a solution and add the 'Phone to Case' BPF in that solution.
    Open the BPF by double-clicking on it.
    In the UI that appears, add the needed 'skillset' option set column in the first 'Identify' stage.
    After the Identify stage, add a condition and connect one path of the condition with the 'Resolve' stage.
     
    The following video demonstrates it clearly:
    https://www.youtube.com/watch?v=InUNdHtKZ4E
     
    Kind regards
    Gulshan

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
Suriyanarayanan V Profile Picture

Suriyanarayanan V 22

#2
Tom_Gioielli Profile Picture

Tom_Gioielli 20 Super User 2026 Season 1

#3
Encore Business Solutions Profile Picture

Encore Business Sol... 14

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans