function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Alex Packard 5Alex Packard 5 

QuickAction.DescribeQuickActions Broken In Managed Packages

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://partners.salesforce.com/ideaView?id=0873A0000003b7NQAQ
Alex Packard 5Alex Packard 5
Here's an alternative link for the idea: https://success.salesforce.com/ideaView?id=0873A0000003b7NQAQ
Igor Babych 14Igor Babych 14