How to set active stage in Business Process Flow using javascript

Question Status

Suggested Answer
Kavya V asked a question on 24 May 2017 1:24 AM

Hi,

Can anyone help me out to set active stage in Business Process Flow using javascript based on a field value.

Thanks & Regards

Reply
Suggested Answer
Muhammad Azwar Alam responded on 24 May 2017 1:41 AM

Hi try following link

msdn.microsoft.com/.../dn817878.aspx

msdn.microsoft.com/.../dn817874.aspx

Mark answer as verified, if it works for you

Reply
Kavya V responded on 24 May 2017 1:45 AM

I tried this, but it didn't work for me

Reply
Kavya V responded on 24 May 2017 1:49 AM

Xrm.Page.getAttribute("stageid").setValue(guid);

I tried with above code, where only the flag is set to particular stage but the color of the stage remains same

Reply
Suggested Answer
Mohd Saad Akhtar responded on 24 May 2017 1:58 AM

Xrm.Page.data.process.setActiveStage(stgGUID, callbackFunction);

Reply
Kavya V responded on 24 May 2017 2:04 AM

I tried this, callbackfunction is yielding Failure result

Xrm.Page.data.process.setActiveStage(guid, switchStageEnd);

function switchStageEnd(result)

{

if(result == "success")

{

alert("Yes");

}

else{

alert("No");

}

}

Reply
CrmMouss responded on 18 May 2018 10:45 AM

Hi Kavga

i have the same problem , any solution.

Thank you

regards

Reply
Suggested Answer
Muhammad Azwar Alam responded on 24 May 2017 1:41 AM

Hi try following link

msdn.microsoft.com/.../dn817878.aspx

msdn.microsoft.com/.../dn817874.aspx

Mark answer as verified, if it works for you

Reply
Suggested Answer
Mohd Saad Akhtar responded on 24 May 2017 1:58 AM

Xrm.Page.data.process.setActiveStage(stgGUID, callbackFunction);

Reply