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)

Ribbon button should be disabled until there are no unsaved changes

(0) ShareShare
ReportReport
Posted on by 267

Ribbon button should be disabled until there are no unsaved changes.

I want to disable a button until all changes are saved and then the button should be accessible to click.

Please help me? Its urgent.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    Hi,

    You can workaround with enable and disable rules for button using ribbonworkbench

    www.powerxrm.com/how-to-dynamically-enabledisable-ribbon-buttons-based-on-field-values

    Thanks

  • Suggested answer
    Mahendar Pal Profile Picture
    45,095 on at

    Hi Varma,

    You are looking to disable button on new create form ?? if yes you can simply apply Entity State rule to your button, Or if you are looking to disable button if you form have any dirty data then you can write a custom js to simply check if form is dirty like below and based on the response you should be able to enable/disable field.

    function CheckUnsavedChanges()

    {

    return Xrm.Page.data.entity.getIsDirty();

    }

  • Suggested answer
    Aric Levin - MVP Profile Picture
    30,190 Moderator on at

    Hi Varma,

    In Dynamics CRM 2013 and above Ribbon buttons are not disabled on the form.

    Although there are display rules and enable rules, when you set a rule that "disables" a button, the button will not physically appear on the form, until the conditions change in which the button at that point will become visible.

    As Mahen suggested, you can specify a JavaScript function to show/hide the button and base this on whether the form is Dirty or not (using Xrm.Page.data.entity.getIsDirty()).

    If you need help with ribbon workbench on creating rules, go to:

    ribbonworkbench.uservoice.com

    There are plenty of articles there, as well as in this forum (and blogs) on how to enable or disable buttons.

    Hope this 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

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