You need to sign in to do that
Don't have an account?
Plainview
Hello,
We have an Apex Class (opportunityButtons), which is coded to expose a button on our opportunities to only a few specific User Id's. The Security link to the class is set to allow access to this class but not everyone under the listed profiles can see the button; only those whose record Id's appear in the code. I double-checked by adding my own User Id and it worked, so I know this is where this has been set-up.
My question is: what would be the logic to expose the button to everyone under a certain Profile as opposed to having to input each User's Id to allow access to the button.
The button appears on our "upgrade" opps layout for the User whose Id's appear in the code. Here are a couple of screenshots - one showing the button in question and the other, the related code.
Thanks for any help!
Best,
Julien
Exposing a feature in an Apex Class to Users in Certain Profiles, Groups or Queues.
Hello,
We have an Apex Class (opportunityButtons), which is coded to expose a button on our opportunities to only a few specific User Id's. The Security link to the class is set to allow access to this class but not everyone under the listed profiles can see the button; only those whose record Id's appear in the code. I double-checked by adding my own User Id and it worked, so I know this is where this has been set-up.
My question is: what would be the logic to expose the button to everyone under a certain Profile as opposed to having to input each User's Id to allow access to the button.
The button appears on our "upgrade" opps layout for the User whose Id's appear in the code. Here are a couple of screenshots - one showing the button in question and the other, the related code.
Thanks for any help!
Best,
Julien
Chances are this won't be the same in Production and Sandboxes, but you can do a lookup of profiles and store in a map, then use this to check against profiles where you want to allow access.