0

I want to know if an action yalout can be called from a component in Salesforce (aura o lwc).

This is the action layout that I want to add with its predefined fields

enter image description here

1 Answers1

0

You should be able to navigate to quick action (pay attention to the URL when you click it and try to reproduce that, {myDomain}/lightning/action/quick/Account.QuickActionApiName?recordId=001.... If url hacks are not out thing - https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_system_quickaction.htm but it'll blindly execute the action, don't think it's a redirect.

If you're after real reuse of the layout inline (kind of like lightning-record-edit-form + fields + prepopulation) - tricky. There are objects you can access to read that config (https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_quickactiondefinition.htm, https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_quickaction.htm) but they may not be queryable from apex. Callout to tooling API just to fetch this info feels a bit overkill.

Have you considered "normal" url hack to navigate to new record's page with prepopulated fields? https://help.salesforce.com/s/articleView?id=release-notes.rn_general_lex_navigate_to_record_dfv.htm&release=224&type=5

eyescream
  • 18,088
  • 2
  • 34
  • 46