3

playing around with Winter14 and struggling with QuickActions describeQuickActions

http://bit.ly/16FlwNA

the Preview Docu for DescribeQuickActionResult mentions the describeQuickActions to get this type, yet I cant find any more details on the method.

Has anyone input on this?

2

The prerelease Apex Code guide has a few topics, including a page on DescribeQuickActionsResult instance methods for retrieving information about the action such as type of action, size, name of canvas app or visualforce page.

I attempted to get a working link, but since this is sitting in early pre-release right now, none of the document locations that I was able to find created reliable links.

So, here's how to find it.

  1. Go to the HTML version of the pre-release guide.
  2. Click on Search.
  3. Enter "describeQuickActions" in the search box and click Search.
  4. I found one result here. Select that. And on that page is the link for the DescribeQuickActionsResult instance methods.

This answer will need to be updated post-GA

2
  • thanks for the feedback. but how do I actually get an instance of a DescribeQuickActionsResult, its returned by the 'describeQuickActions' method, yet I cant feed any details on the describeQuickActions method at all – Seb Wagner Aug 24 '13 at 12:59
  • I see what you mean. Some fiddling around with the Dev Console didn't yield anything. Just copied SalesforceDocs on the tweet for this. – pchittum Aug 24 '13 at 22:39
1

Got feedback from @salesforcedocs

describeQuickActions takes as its argument a list of action names & returns a list of QuickAction.DescribeQuickActionResult objects.

QuickAction.DescribeQuickActionResult[] result = QuickAction.describeQuickActions(new String[]{Schema.Account.QuickAction.NewContact})
1

This is an old question, but for the sake of any who stumble across it later, here's the documentation for the QuickAction class.

To get a list of available quick actions on an object or the Chatter tab:

// Called for Account entity.
List<QuickAction.DescribeAvailableQuickActionResult> result1 = 
    QuickAction.DescribeAvailableQuickActions('Account');  

// Called at global level, not entity level.
List<QuickAction.DescribeAvailableQuickActionResult> result2 = 
    QuickAction.DescribeAvailableQuickActions('Global');  

To get details on a specific action, see the documentation for DescribeQuickActionResult.

An example: get all the rows in the default global "New Lead" action:

QuickAction.DescribeQuickActionResult[] results = QuickAction.describeQuickActions(new String[]{ QuickAction.NewLead });
for (QuickAction.DescribeQuickActionResult res : results) {
    for (QuickAction.DescribeLayoutRow row : res.getLayout().getLayoutRows()) {
        // Do something with each row
    }
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.