Skip to main content

Notifications

Announcements

No record found.

Service | Customer Service, Contact Center, Fie...
Answered

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

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
    saikrishna963 Profile Picture
    saikrishna963 42 on at
    RE: Need to hide resolve case button when processstatus(Lookup) = Change in NRA

    good

  • Verified answer
    Bipin D365 Profile Picture
    Bipin D365 28,964 Super User 2024 Season 1 on at
    RE: Need to hide resolve case button when processstatus(Lookup) = Change in NRA

    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
    Bipin D365 Profile Picture
    Bipin D365 28,964 Super User 2024 Season 1 on at
    RE: Need to hide resolve case button when processstatus(Lookup) = Change in NRA

    Hi,

    Add debugger in your code ..

    Also add alert in your code.

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

  • saikrishna963 Profile Picture
    saikrishna963 42 on at
    RE: Need to hide resolve case button when processstatus(Lookup) = Change in NRA

    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
    Bipin D365 28,964 Super User 2024 Season 1 on at
    RE: Need to hide resolve case button when processstatus(Lookup) = Change in NRA

    Hi,

    Not required...only keep formContext parameter.

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

  • saikrishna963 Profile Picture
    saikrishna963 42 on at
    RE: Need to hide resolve case button when processstatus(Lookup) = Change in NRA
    • 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
    Bipin D365 28,964 Super User 2024 Season 1 on at
    RE: Need to hide resolve case button when processstatus(Lookup) = Change in NRA

    Hi,

    Please see ee below link

    d365demystified.com/.../

  • saikrishna963 Profile Picture
    saikrishna963 42 on at
    RE: Need to hide resolve case button when processstatus(Lookup) = Change in NRA

    Shall i pass primary control to function

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,964 Super User 2024 Season 1 on at
    RE: Need to hide resolve case button when processstatus(Lookup) = Change in NRA

    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

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans