I have created an LWC component for quick action and also defined the @api recordId
inside that. But the recordId
is undefined in the component when logged. Seems like it is not being passed to the component from quick action. Why is it undefined
?
[SalesForce] recordId is undefined in LWC quick action component
Related Topic
- [SalesForce] Unable to close quick action from LWC (from Web component)
- [SalesForce] LWC Quick Action – recordId propertyindefined in ConnectedCallback context
- [SalesForce] is recordId passed to lwc in a quick action
- Headless Quick Action For a LWC – You can only create Quick Actions with actionSubtype matched with the Lightning Web Component you defined
- LWC Quick Action for Task
Best Answer
Implement a setter for the Id and add your logic here to be executed as soon as the value is populated by SF internally.