I believe this has asked before, but the most recent was in 2020 ((+) Trigger resolve case dialog when click on button finish in business process flow - Dynamics 365 Customer Service Forum Community Forum)
Wondering if there have been any updates that would allow for this to be done more easily.
Users view having to click "Finish" and then "Resolve Case" as redundant. When a user clicks "Finish" in the BCP I would like to trigger the same command/function that the "Resolve Case" button does.
I've tried to track down the command via Ribbon Workbench to no avail.
Having a step in the flow to "Resolve Case" also does not do anything:
Never mind, user error and proof I shouldn't code too early in the morning.
When I registered the web resource as an event handler I was calling the onFinishBPF function in the web resource
Changed it to call the onLoad function and now it is working.
Many thanks for this solution. My users thank you as well.
This almost works. Unfortunately, it seems that clicking finish does not trigger a reload of the form.
When I create the form it triggers the Onload I added an alert to verify:
and when I save the form it triggers the Onload.
But when I click finish it does not force Onload, only when I save again. I'm going to see if there is a way to trigger the function from the BPF or force a reload of the page on Finish.
Hello,
That task looked interesting to me so I decided to investigate and came up with the following code that worked for me:
function onLoad(executionContext) { var formContext = executionContext.getFormContext(); formContext.data.process.addOnProcessStatusChange(onFinishBPF); } function onFinishBPF(executionContext){ var formContext = executionContext.getFormContext(); var status = formContext.data.process.getStatus(); if (status === "finished") { CrmService.IncidentRibbon.CommandBarActions.resolve(); } }
All you have to do is to create a webresource, add the code I provided to it, add it to your form and register onLoad handler.
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 Mansi Soni as our August 2025 Community…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Abhilash Warrier 100 Super User 2025 Season 2
Suresh Kulla 72 Super User 2025 Season 2
DAnny3211 54