SBX - Search With Button

SBX - Forum Post Title

How to set active stage in Business Process Flow using javascript

Microsoft Dynamics CRM Forum

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

Question Status

Suggested Answer

Hi,

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

Thanks & Regards

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

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
Mohd Saad Akhtar responded on 24 May 2017 1:58 AM
My Badges
Suggested Answer

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
My Badges

Hi Kavga

i have the same problem , any solution.

Thank you

regards

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

Hi try following link

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

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

Mark answer as verified, if it works for you

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

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

Reply

SBX - Two Col Forum

SBX - Migrated JS