1

I have created a Quick Action button, that basically calls a webservice and displays the data in a popup window.

Right now, I only want certain users to have access to the Quick Action button.

I don't want to create a new Profile for these users, and assign a new page layout to the new Profile because eventually everyone will have access to the Quick Action.

I was thinking of Permission Set, but that does'nt seem to address my use case, unless i am missing something.

Does anyone have other suggestions?

3 Answers 3

1

I am not sure if it is the best approach, but I had a situation very close of that where i had created custom field called as EnableFeature__c with field type checkbox in User object for storing value to enable this feature.

In lightning controller js doInit function, I'm calling apex class where logic was to get current user data using SOQL and checking this field and returning the boolean result. Based on the result i was displaying the message to user as custom toast message because standard toast message wont supported in Lightning quick action.

1
  • Thanks @ChetanNandre. That's a good work around however, not the best approach (as you guessed) for my use case. Commented Sep 19, 2019 at 15:02
0

Why don't you add a user name check in your code, so that way, it will be only useful for the users intended to else it will not work or just show a friendly error saying this feature is not available for you.

I know this seems to be a work around and not a solution. But without profile and pages, this is something I can think of.

2
  • Thanks @AmitSahu for the response. In few weeks everyone will have access to the Quick Access Button, hence I don't want to handle it in the code, and was hoping I could handle it through Configuration. Commented Sep 13, 2019 at 16:35
  • 1
    @user4947 (This is just an option, but for your use case this does not make sense to have this much work just to throw it out. Sharing it. if someone might want to have a long term solution). This can be only achieved with custom code then. You will have to create the entire page again and add the permission set code, which will then render the buttons.That's being said, there is no out of the box feature to support your case.
    – Amit Sahu
    Commented Nov 18, 2019 at 15:53
0

Use the lightning page highlights panel, and restrict the actions based on custom permission. Add the custom permission to a permission set and then assign the relevant users to the permission set - making it scalable if the users change or other access (fields etc.) are required for your action to work.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .