For the complete documentation index, see llms.txt. This page is also available as Markdown.

How to run Form Action from Lightning Component

To run form action from lightning component one has to fire FLX_KB:ApplicationEvent event and pass following JSON object as 'data' parameter:

{
	"target": "{FORM_ID}",
	"busEvent": {
		"source": "external",
		"actions": {
			"{FORM_ACTION_NAME}": {
              "parameters": {
                  "{FORM_ACTION_PARAMETER_NAME}": "{PARAMETER_VALUE}"
               }
           }
        }
    }
}

Function in below example will run "Check options" action on the form.

runAction : function(component, event, helper) {
    var params = 'January;March';
        
    var appEvent = $A.get("e.FLX_KB:ApplicationEvent");
    var jsonObject = {
		"target": "{FORM_ID}",
			"busEvent": {
             "source": "external",
              "actions": {
                  "Check options": {
                      "parameters": {
                          "options": params
                       }
                   }
               }
          }
     };
     
     appEvent.setParams({"data" : jsonObject});
     appEvent.fire();
        
}

See form action setup:

Drawing

and picklist setup:

Drawing

Execution of action triggered from the Lightning Component will check January and March options of picklist:

Drawing

Last updated