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...
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 .
  • Verified answer
    gulshankhurana Profile Picture
    15 on at
    system entity stage skip in BPF based on a field value in Customer service module.
     
    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

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,688 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,643 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans