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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Hide/Disable back button from Business Process Flow

(0) ShareShare
ReportReport
Posted on by

Hello Everyone,

I would like to know that is there any way to disable back button present on Business Process Flow for any entitiy.  Is it possible with Javascript and how?

Regards,

Deepak

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Jagannath Profile Picture
    545 on at

    Hi Deepak,

    Just check the below link.

    community.dynamics.com/.../224235

    It might helpful.

    Thanks,

    Jagannath

  • Community Member Profile Picture
    on at

    This is the code i used to hide "Finish" button of Business Process Flow, please substitute the id with the id of the button you want to hide:

    var hide = true;
    var interval = null;
    function OnLoad(){ 
        interval = setInterval(function () {
            var element = parent.document.getElementById("stageFinishActionContainer");
            if (element != null && hide == true) {
                hide = false;
                element.style.display = "none";
                clearInterval(interval);
            }
        }, 1000);
    }

    If you found the answer helpful, please mark as Verified 

    Thank you & Best Regards

    Francesco Picchi

    Microsoft Dynamics CRM Consultant, Bologna, ITALY

    Independent Contractor

    http://www.francescopicchi.com

  • ashlega Profile Picture
    34,477 on at

    This is unsupported, though:)

  • Community Member Profile Picture
    on at

    Yes, it is but ... it's the only solution :-)

  • Community Member Profile Picture
    on at

    Hi Francesco,

    I'm trying to do exactly the same thing (hide the finish button) on a BPF! I'm quite new to using code in Dynamics so excuse my ignorance, but what do you do with this code/where do you put it?

    Thanks in advance!

    Olly

  • LeIfe Profile Picture
    10 on at

    Francesco, do you have an update for this solution that works with the new Unified Interface? Thanks

  • Community Member Profile Picture
    on at

    What's the requirement behind hiding the Finish button, if I may know.

  • LeIfe Profile Picture
    10 on at

    Its a business requirement, where only the highest ranking BD leader can click finish after reviewing

  • Suggested answer
    ManelPereira98 Profile Picture
    5 on at

    Hi, I also had this requirement, this blog post helped me a lot, it uses the Xrm library, so it should be future compatible.

    Here is the code I used:

    function hidePreviousStageButton(executionContext) {
        var formContext = executionContext.getFormContext();
        var process = formContext.data.process;        
        //handles changes to the BPF before they actually occur
        process.addOnPreStageChange(myProcessStateOnPreChange);
    }
    function myProcessStateOnPreChange(executionContext) {
        var formContext= executionContext.getFormContext();
        var process = formContext.data.process;
        var eventArgs = executionContext.getEventArgs();
        var currentStageId = process.getActiveStage().getId();
        var nextStageId = process.getSelectedStage().getId();
        //dont allow to go back using the set active button
        if (currentStageId != nextStageId) {
            eventArgs.preventDefault();
            Xrm.Utility.alertDialog("You cannot use the Set Active button.")
            return;
        }        
              
        if (eventArgs._direction === 1) //backwards
        {            
            //here you can add logic based upon the BPF going to the previous Stage.
            return;
        }
        //otherwise forward
        // here you can add logic based upon the BPF going to the next Stage.   
    }
    Hope it helps!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans