QuickAction.DescribeQuickActions() will return different results when called from a managed package context and unmanaged code.

For a given entity type, for example Contacts, you must call QuickAction.DescribeAvailableQuickActions('Contact') to get a list of available contact quick action names. Take those quick action names and pass them into QuickAction.DescribeQuickActions(names). This describe call will only correctly return the quick actions if called from unmanaged code (for example, when called from anonymous apex). However, if this code is called as part of a managed package, the expected quick actions are not returned.

We've noticed that passing in a namespaced quick action names into the method will still work in a managed package. We suspect that Salesforce is incorrectly trying to add the package's namespace to the quick action names being passed into the call, but this makes it impossible to access non-namespaced quick actions.

Has anyone ever run into this before? Any ideas on how to get around it?

P.S. I also made an idea for Salesforce to correct this behavior, please vote for it: https://success.salesforce.com/ideaView?id=0873A0000003b7NQAQ


You must log in to answer this question.

Browse other questions tagged .