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)

Show/Hide button on the base of status using Ribbon Workbench

(0) ShareShare
ReportReport
Posted on by 3,634

I've a custom button and a system button, and by using Ribbon workbench I want to show custom button when the form is inactive state and show system button when the form is in 'active' state. I am using following ValueRule step in Display Rule but it doesn't seem to work or I am missing something in between?

Display-Rule.JPG

*This post is locked for comments

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

    For Custom Button Display Rule make statecode value = 1 and For Standard Button Display Rule make statecode value = 0

  • Suggested answer
    Abdul Wahab Profile Picture
    12,119 Moderator on at

    Hi Mohsin

    Could you use this line 'Xrm.Page.ui.refreshRibbon();' on 'On-Load' event?

    Thank You

  • Mohsin Ali Profile Picture
    3,634 on at

    I set value 1 for custom button and 0 for system button. Also, I am already refreshing the ribbon, but it is displaying both button in the ribbon

  • Suggested answer
    Community Member Profile Picture
    on at

    Make Default value to null

  • Suggested answer
    Nithya Gopinath Profile Picture
    17,078 on at

    Hi Mohsin Ali,

    You can write a Form State Rule in Display Rules to achieve this functionality.

    See this thread: https://community.dynamics.com/.../153867

    Hope this helps.

  • Mohsin Ali Profile Picture
    3,634 on at

    I tried to use Form State in Display Rule and set the form state as 'Disabled' and 'Read only' for the button that I want to show on inactive records but it hide the button and not show on any form.

  • Verified answer
    Mohsin Ali Profile Picture
    3,634 on at

    The form state rule is a little confusing. But I used it and I am done with my tasks. Thanks every one.

    For understanding Form State Rule, Referred: msdn.microsoft.com/.../gg334563.aspx

  • Suggested answer
    Community Member Profile Picture
    on at

    For Custom button which is to be displayed when record is deactivated, use this Value Rule:

    5468.1.PNG

    For Standard Button which is to be displayed when record is Active, use this FormStateRule:

    5468.1.PNG

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