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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Suggested Answer

I want to hide reactivate button when case status = resolved. The code is under image can anyone please say it is correct or not and it is not working

(0) ShareShare
ReportReport
Posted on by 42

16655761928228125655296080144144.jpg

function OnChangeSetVisibilty(primaryControl)
{
var isVisible = false;
var formContext = primaryControl.formContext();
formContext.attributes.get("lgr_processtype").getValue() != null


if(formContext.attributes.get("lgr_processtype").getValue() != null && formContext.attributes.get("lgr_processtype").getValue()[0].name =="change in Nominated Retirement age")
{
isVisble = true;

}
retrun isVisible;

}

I have the same question (0)
  • CRMJetty Profile Picture
    3,514 on at

    Hi saikrishna963 ,

    Please refer below links to hide/show ribbon button based on status field value in D365:
    https://community.dynamics.com/crm/f/microsoft-dynamics-crm-forum/153867/hide-button-based-in-form-status-in-ribbon-workbench
    https://d365demystified.com/2021/01/08/ribbon-button-visibility-based-on-a-field-value-in-dynamics-365-ribbon-workbench/

    I hope it helps,

    Thanks.

    Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365 portal.

  • Bipin D365 Profile Picture
    28,985 Moderator on at

    Hi,

    Open ribbon workbench tool - select Reactivate button - right click and select customize command-

    Add display rule - select value rule - provide status field and value ...select Inver result to true.

  • saikrishna963 Profile Picture
    42 on at

    I have done it but it is still vsisble

  • saikrishna963 Profile Picture
    42 on at

    I have done this but still button is visible

  • Suggested answer
    Bipin D365 Profile Picture
    28,985 Moderator on at

    Hi,

    Please share screenshot of what you have done.

    Have you published your changes.

    I hope you given integer value of optionset.

  • saikrishna963 Profile Picture
    42 on at

    16655615666247041599034581835595.jpg

  • Suggested answer
    Bipin D365 Profile Picture
    28,985 Moderator on at

    Set Invert result to false and publish .

  • saikrishna963 Profile Picture
    42 on at
    • 16655652466867209211002487252459.jpgNow also it is not working
  • Suggested answer
    Bipin D365 Profile Picture
    28,985 Moderator on at

    Hi,

    Try to debug ribbon button

    d365demystified.com/.../

    So Reactivate button is still visible on closed Case ?

    Have you associated your newly created display rule to comman of Reactivate button. This is mandatory

  • Suggested answer
    Bipin D365 Profile Picture
    28,985 Moderator on at

    Hi,

    Please check existing Display Rule attached to Reactivate button.

    I checked in my Onpremise instance and I see one display rule attached to this button

    FormstateRule State Disabled

    You may have to modify this to make it work

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 51 Super User 2026 Season 1

#1
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 51 Most Valuable Professional

#3
Nagaraju_Matta Profile Picture

Nagaraju_Matta 50

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans