Getting Started with Salesforce Quick Action APIs – Part 2 (Automatically populate fields with custom data values)

This is the 2nd post on Salesforce Quick Action APIs - Part 2. For Part 1 Please refer to this link Getting Started with Quick Action APIs – Part 1

This Quick Action APIs – Part 2 where we will focus on how to set default values while calling a quick action so that some fields where data should come from the current custom screen will be auto-populated upon execution. 

Note: For Quick Action APIs to work the requested component should be present on the record current screen from where this action will invoke else system will through error ☹️

Below is simple Lightning Aura Component - Screen and ControllerJS

The key items are: 
  • lightning:quickActionAPI - Used for including Quick Action API in a component
  • setActionFieldValues - Promise function used for calling and setting default values. Here for setting values the syntax will be in this formate- field API name with a JSON object with the key will be "Value" and value will be either String or Array separated by a colon ":"

Comments

Popular posts from this blog

Getting Started with Salesforce Quick Action APIs – Part 4 (Email Action with email template)

Getting Started with Salesforce Quick Action APIs – Part 1 (Invoke using custom button)