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 :
Service | Customer Service, Contact Center, Fie...
Answered

Need to hide resolve case button when processstatus(Lookup) = Change in NRA

(0) ShareShare
ReportReport
Posted on by 42

16655787507024982649411305606165.jpg_2D00_640x480.jpg

Need to hide resolve case button when processstatus(Lookup) = Change in NRA . Can anyone please provide javascript code for this one...Help is appreciated

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

    Hi,

    function HideResolveCaseButton(formContext)

    {

    var processId = formContext.getAttribute(“ownerid”).getValue();

    var Name = processId[0].name;

    if(name =="Change in NRA")

    return false;

    else

    return true;

    }

    Replace ownerid with process field schema name

    Select primaryControl parameter while calling this method from ribbon enable rule

  • saikrishna963 Profile Picture
    42 on at

    Shall i pass primary control to function

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

    Hi,

    Please see ee below link

    d365demystified.com/.../

  • saikrishna963 Profile Picture
    42 on at
    • 16656556571666058219967489920930.jpgHI bipin i have added that I am asking shall I need to pass primary control to function in code 16656558097445402225178974777765.jpg
  • Suggested answer
    Bipin D365 Profile Picture
    28,995 Moderator on at

    Hi,

    Not required...only keep formContext parameter.

    Why did you set Invert Result to true, it should be false only

  • saikrishna963 Profile Picture
    42 on at

    HI bipin the resolve button is hidden when process type = change in NRA but resolve case button should be hidden only when process type = change in NRA but it Is hiding for all values 16657258735783313001956436841906.jpg

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

    Hi,

    Add debugger in your code ..

    Also add alert in your code.

    Again try ribbon debugging feature to see which rule is not satisfied

  • Verified answer
    Bipin D365 Profile Picture
    28,995 Moderator on at

    Hello,

    Does it work when you open any existing record where process type is not Change in NRA?

    I believe it does not work when you change option set field on the form .

    You will have to write below code and attach this on onchange of process type field to refresh your ribbon.

    formContext.ui.refreshRibbon();

    learn.microsoft.com/.../refreshribbon

  • Suggested answer
    saikrishna963 Profile Picture
    42 on at

    good

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 Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

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

#1
Daniyal Khaleel Profile Picture

Daniyal Khaleel 60 Most Valuable Professional

#2
11manish Profile Picture

11manish 12 Super User 2026 Season 2

#3
Hamza H Profile Picture

Hamza H 8 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans