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

Power Apps Drag & Drop Kanban code sample

  Introduction: The Kanban Board App Developers at a software company use the Kanban board to show their progress on development tasks and b...