Posts

Showing posts from June, 2020

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

This is in  continuation  of previous posts on Salesforce Action APIs. For previous posts refer to this link  Getting Started with Quick Action APIs This Quick  Action APIs – Part 4  where we will focus  on how to set an email action with Email Template so that the expected email the body can be automatically generated based on a pre-defined email template. Pre-requisites for this exercise: Create an HTML email template (with or without letterhead) named " Quote Dealer Email Template " or any other type based on your choice. For this, we have to build a scenario where we are using the visualforce page to generate PDF and the same PDF needs to be sent out to the customer using a  pre-defined   email template using  "Send Email" Quick Action. Steps will be the following: Create a simple visualforce page using the standard controller of " Quote "

Getting Started with Salesforce Quick Action APIs – Part 3 (Email Action with file attachment)

This is in continuation of previous posts on Salesforce Action APIs. For previous posts refer to this link  Getting Started with Quick Action APIs This Quick  Action APIs – Part 3  where we will focus  on how to set email action fields value especially Attachments/Content documents. For this, we are building a scenario where using the visualforce page a PDF will be generated and the same PDF needs to be sent out to the customer using "Send Email" Quick Action. Steps will be the following: Create a simple visualforce page using the standard controller of "Quote" object named "QuotePDF" Embed the "QuotePDF" in lightning Component using an iframe for preview. Upon iframe, Load saves the PDF under the current Quote record as Content Document and return content document id. Now pass t

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 JSO

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

For so long everybody requesting me to post on Salesforce Quick Action APIs as there is very little documentation and often the documentation does not provide details on some critical features and their implementation. So here I am with  Quick Action APIs – Part 1 where we will focus on how to call/invoke any Quick Action from Custom Lightning Aura Component. 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 invokeAction - Its calls action submit automatically upon successful execution of method "setActionFieldValues"