Tuesday, 18 October 2022

BPF auto movement in dynamics crm - Using javascript ( please refer next blog using plugin)

 Moving to next stage : 

Consider the below JavaScript code which is fired during OnSave event of the form record. 


function BPFMove(executionContext) {

    //Initiated Form Context.

    var formContext = executionContext.getFormContext();

    //Getting Value From Field Account Closed.

    var AccountClosed = formContext.getAttribute("accountclosed").getValue();

    //Condition If Account Closed Is True.

    if (AccountClosed === true) {

 //Moving Chevron To Next Stage.

formContext.data.process.moveNext();

    }

}





Moving to previous stage :

function BPFMove(executionContext) {

   //Initiated Form Context.

    var formContext = executionContext.getFormContext();


    //Getting Value From Field Account Closed.

    var AccountClosed = formContext.getAttribute("accountclosed").getValue();


    //Condition If Account Closed Is False.

    if (AccountClosed === false) {


        //Moving Chevron To Previous Stage.

        formContext.data.process.movePrevious();

    }

}

No comments:

Post a Comment

Introduction to Dynamics 365 CE Data Migration using ADF

Dynamics 365 CE Data Migration using ADF can be necessary for various reasons, such as archiving historical data, integrating with other sys...