Tuesday, 2 August 2022

How to get the current recordId in LWC quick action?

Hi,

To get the current recordId when we create a quick action with LWC  we have to use the below code snippet.



_recordId;
set recordId(recordId) {
    if (recordId !== this._recordId) {
        this._recordId = recordId;


Note:
LWC quick actions don’t pass in recordId in connectedCallback()




Reference:


No comments:

Post a Comment

Agentforce metadata types for deployment

 Hi, The following are key metadata types to consider when deploying Prompt Templates, Topics, Agent Actions, and Agents in Salesforce. <...