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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to remove Close as Won and Close as Lost options in opportunity for some specific users?

(0) ShareShare
ReportReport
Posted on by 347

Hi,

I have a requirement to remove the option of Close as Won and Close as Lost options from Opportunity for some users. There are few users that use our CRM and company wants just to allow them to add opportunity or to edit opportunity. They don't want to allow them to close or lost the opportunity on their own.

I want to know how it can be done? Is there anyway to do this? Any help or suggestion would be highly appreciable.

Thanks.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Mahendar Pal Profile Picture
    45,095 on at

    Hi,

    You can hide these ribbon buttons based on some logic for example you can create a specific security role which you can assign to these setup of users and than can hide it based on their security role or can use specific entity privileges .

    Please follow steps here: ribbonworkbench.uservoice.com/.../76681-hide-a-standard-out-of-the-box-button-based-on-a

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

    Hi waleedbinafzal,

    You can use Enable rules or Display rules to show/hide the Close as Won and Close as Lost buttons using Ribbon workbench.

    See: www.powerobjects.com/.../solving-security-headaches-display-rules-based-on-security-roles

    Hope this helps.

  • Suggested answer
    sandeepstw Profile Picture
    4,601 on at
  • waleedbinafzal Profile Picture
    347 on at

    Hi Nithya,

    I have gone though this link, but the problem is it is not telling how I can hide these options for a specific user with respect to security role? I mean, if I have a user having the security role as for eg: admin, then how can I apply the customization to this security role?

    Infact all the solutions given above, all have the same problem. They are not showing how i can relate it to a specific user or a specific security rule.

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

    Hi,

    You can create a custom Javascript webresource which checks the logged in user and if the user is specific user (eg: admin), return true (which means the button will be visible?) else false to hide the button according to your requirements. Add this JavaScript webresource along with the opportunity entity to a solution and open this solution in ribbon workbench. Right click the button you need to customize and select Customize Command. In th display rules section, add a new custom rule and give the JavaScript function in your custom Javascript webresource which decide whether to show or hide the button (true of false returned from JS function).

    See: community.dynamics.com/.../178915

    In the link above, it is getting the current user security roles.

    You can get the current userId in javascript using the code below.

    Xrm.Page.context.getUserName();

    Hope this helps.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ZS-27011425-0 Profile Picture

ZS-27011425-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans