web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to call javascript function on Finish button in Business Process flow?

(0) ShareShare
ReportReport
Posted on by

Hi All,

I want to lock some fields on the Business Process Flow when user clicks on the "Finish" button from the business process flow.

How to do this?

I am working on CRM 2016 Onpremise.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    I believe you will have to handle change of stage. You can add own handler using following approach - msdn.microsoft.com/.../dn817878.aspx

  • Community Member Profile Picture
    on at

    Hi, Thanks for your reply. I am already using below function to find stage change but when I click on finish nothing triggers.

    function BPFOnStageChange(context) {

    debugger;

    try {

    var stageName = "";

    if (context.getEventArgs().getDirection() === "Next") //"previous" for previous stage

    {

    stageName = context.getEventArgs().getStage();

    if(stageName){

    if (stageName.getName() === "One") {

    showHideOneStage();

    }

    else if (stageName.getName() === "Close") {

    showHideCloseStage();

    }

    }

    } else if (context.getEventArgs().getDirection() === "Previous") //"previous" for previous stage

    {

    stageName = context.getEventArgs().getStage();

    if (stageName.getName() === "One") {

    showHideOneStage();

    }

    else if (stageName.getName() === "Two") {

    showHideTwoStage();

    }

    }

  • Verified answer
    Community Member Profile Picture
    on at

    I found the solution here,

    stackoverflow.com/.../how-to-get-process-finish-button-event-in-dynamics-crm

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans