Monday, July 8, 2019

Load BusinessProcessFlow thru JavaScript in Dynamics 365

If you want to show BPF for these records which Process id is NULL, you need to call following JS in the form load event.

function setProcessId() {
var processId = Xrm.Page.context.getQueryStringParameters().process;
if (processId == null) {
//Business Process Flow Id
var procesGuid = '03278623-2923-443A-957C-AF56D1B1FC81';
Xrm.Page.data.process.setActiveProcess(procesGuid, function callbackFunction() { });
}
}