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 :
Customer experience | Sales, Customer Insights,...
Answered

Need to hide on Close as won button on opportunity Homepage Level

(0) ShareShare
ReportReport
Posted on by 35

Hi Guys,

I have a button like "Close as won" on opportunity home page level. If I select the record on home page and selected record field  value "amount" contains > 0 and login user have sales person role then I need to show the "Close as won button" on home page otherwise I need to hide.

criteria: 1: Selected record fields value >0  and login user contains sales person role.

pastedimage1620640254007v1.png

Thanks

I have the same question (0)
  • Suggested answer
    meelamri Profile Picture
    13,218 User Group Leader on at

    Hi,

    You need to implement a custom Enable Rule using some JS Code. Please refer to this blog:

    d365demystified.com/.../

  • D365 online Profile Picture
    35 on at

    Based on the security role I am able to hide the button on home page but here I want selected record field value I need to hide the button on home page.

    Based on filed value and login user roles I am able to show and hide the button on form level and now I want to do on home page level

  • Verified answer
    meelamri Profile Picture
    13,218 User Group Leader on at

    I understand your problem.

    You can only get the Id using SelectedControlSelectedItemReferences CRM Parameter. Then, you need to retrieve your field value using the webApi.

    Managing an Async call within an Enable rule is tricky. Please refer to the blogs below for more details about the implementation

    dynamict.eu/.../

    butenko.pro/.../

  • D365 online Profile Picture
    35 on at

    So I need to write two enable rules to achieve my requirement, am i right?

    sorry I find this solution(dynamict.eu/.../) but i am not able to understing this logic. I tried update this code but no luck

  • Suggested answer
    meelamri Profile Picture
    13,218 User Group Leader on at

    Yes you can separate your logic into two Enable rules. Take more time analyzing andrew butenko's code. It will be more helpful:

    butenko.pro/.../

  • D365 online Profile Picture
    35 on at

    Thanks Mehdi.

    below link is worked for me

    dynamict.eu/.../

  • meelamri Profile Picture
    13,218 User Group Leader on at

    Good job !!

    Please don't forget to verify my answer by ticking YES. It will help others to find the good solution.  Thank you !

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 July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
11manish Profile Picture

11manish 88 Super User 2026 Season 2

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 40 Most Valuable Professional

#3
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 35 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans