Form Action

How to add form action.

Open "Tools" menu and click "Form Actions".

Click "Add Action" button in the "Form Actions" popup:

New action form will appear.

Action has mandatory field "Title" and optional field "Description".

Action can have conditions that should be matched to execute it. Turn checkbox "Has conditions" on to configure conditions.

You can create form actions of following types:

"Update Value" action type

Select "Update Value" action type, click "Add" button.

"Update Value" action perform updates of following target entities:

  • Form - representing list of form elements that can be updated

  • Variables - form variables

  • Context - context object of the form (e.g. "Case")

Source of data for the update can be of one of the following types:

  • Parameters - parameters passed to the action

  • Form - form elements values

  • Variables - form variables

  • Context - context object of the form

  • Static - static value provided by user

Select target context and field/variable to be updated.

Select source context and field/value to update target with.

"KanBan Action" and "KanBan Action Group" action types

"KanBan Action"/"KanBan Action Group" actions trigger action/action group execution and allow you to use the results of execution in form config.

Select proper type in the "Type" picklist and populate other fields:

  • Name - click Settings icon and select an action/group.

  • Set variables if you need to pass parameters to global action. Follow the sequence of steps to add and set variables in the popup appeared:

  • Result Handlers are form actions that are executed once action execution is done.

NOTE: Output context on Parameters Setup screen represents variables that were set while Global Action execution. Config below uses newCaseId variable that was created by Global Action.

"KanBan Action Group" form action configuring is same as of "KanBan Action".

  • Turn checkbox on to disable spinner that is shown by default while action is executing.

For more information about usage of KanBan Actions and KanBan Action Groups please refer to the following documentation: Actions/Action Groups

"Refresh" action type

'Refresh' action performs refresh of one of the following form elements:

  • Form itself

  • Lists

  • Related Lists

  • Lookups

  • Nested Forms

Select "Refresh" action type (16) and select target element of form (17) to be refreshed:

About refreshing lookups: this action makes lookup field re-evaluate it's conditions that records are shown by.

E.g., lookup conditions contain a variable that is used to filter records in this lookup. If this variable is updated by user (as a result of some manipulations on current form), an Refresh action must be triggered to force Lookup field show records matching new variable value.

Navigate action type allows user to navigate to one of the following resources:

  • URL

  • Visualforce Page

  • Record

  • Form

  • Lightning Component

  • Return Back

Navigate to URL:

  • Configure URL to navigate to (18)

  • Choose if open in new window (19)

  • Pass parameters if necessary (20)

Navigate to Visualforce Page:

  • Select page to navigate to (21)

  • Choose if open in new window (22)

  • Pass parameters if necessary (23)

Navigate to Form:

  • Pick the form to navigate to (26)

  • Choose form mode (27)

  • Pass parameters if necessary (28)

Navigate to Lightning Component:

  • Pick the component to navigate to (29)

  • Choose if it should be opened in popup (30)

  • Pass parameters if necessary (31)

Return back:

  • Pick "Return Back" (32)

  • Specify number of history steps to go back (33)

NOTE: this option executes browser history.back() function. User should provide 'Browser history steps' value to define how many redirects should be executed. By default 'Browser history back' equals 1. 'Return Back' option also allows user to go to one of the previous forms when working with chained forms.

"Form Api" action type

"Form API" actions execute one of the following methods:

  • Save - saves context object

  • Reset - resets the original values of all fields in a form

  • Clear - removes values from all form inputs

  • Show Notification - displays notification to user

  • Validate - validates form inputs and shows error if some of them are blank

  • Print Form - allows to create a PDF version of the Form, which can be printed

  • Fire Event - fires lightning event. It can fire aura application event or force event

  • Execute Form Actions - runs action (or group of actions) on the current form/nested form/parent form.

  • Close - closes current form

  • Calculate - evaluates provided formula expression on server side and retrieves result.

Select necessary method in the "Form Action Type" picklist (34).

Save:

  • Check "Disable Validation" checkbox (35) if you need save data that does not match form validation rules.

  • Select type of Success Message (36). If you want to get rid of it, select "None".

  • To override default message select "Custom Message" and configure it (37).

  • Configure Extended Fields (38) if needed.

Only fields existing in the form will be passed by default onto the server when form is saved. You can add Extended fields - any object fields to be passed and saved in spite of their absence on the form.

Reset:

  • Select Form Action Type "Reset":

Clear:

  • Select Form Action Type "Clear":

Show Notification:

  • Select Notification Type (39)

  • Populate or configure "Title" (40) and "Text" (41)

Validate:

  • Select where validation should be performed (42).

  • Configure "Message" (43) if you need to inform users.

Fire Event:

  • Populate Event name (in namespace:name format) (44).

  • Specify event parameters (45).

Execute Form Actions:

  • Specify Timeout (46) - it is optional setting to delay form action execution.

  • Select "Form" (47) and click "Add" button (48).

  • Based on what form is selected (current form or nested form), "Action" will display list of current form actions or nested form actions (49).

  • Configure parameters if needed (50).

  • If you check "All Forms" (51) - you can execute action from any form in your organization.

Close:

  • Select Form Action Type "Close":

Calculate Form Actions:

Calculate action example:

  • Configure calculation expressions. Specify output variable name (52) and expression which evaluation result will be a value of output variable (53). You can configure several output variables.

  • Results of calculations should be passed to some other action (result handler) (54).

Handler action updates form field with the calculation result:

"KanBan API" action type

"Kanban API" actions at the form are available only for the following methods:

  • Refresh Kanbans

  • Update Variables

  • Print Kanban

  • Hide Kanban

  • Show Kanban

  • Navigate to Kanban

  • Refresh Columns

  • Refresh Columns Header

  • Refresh Column Footer

  • Hide columns

  • Show Columns

  • Refresh card

  • Refresh Card Layout

  • Hide Card Layout

  • Show Card Layout

  • Refresh Cell

  • Update Cell

These methods are described in the proper article.

First select proper method in "Kanban Action Type" picklist (55):

See below how to configure Kanban API methods in the form:

Refresh Kanbans

  • Add kanban(s) (56) to be refreshed (more than one kanban can be refreshed with one action)

  • Specify parts of kanban(s) that should be refreshed (57)

Update Variables

  • Select kanban where variables should be updated in (58)

  • Add and configure variables and their values (59)

  • Add kanban(s) (60) to be printed (more than one kanban can be printed with one action)

Hide Kanban

  • Add Kanban Junction(s) (61) to be hidden (more than one junction can be hidden with one action)

Kanban Junctions show which kanbans are children of which parents (this is suitable for composite kanbans). Hiding proper junction will cause child kanban disappear from the parent.

  • Click "Settings" icon (62) to show Junction selector (63).

  • Select necessary junction and

  • Click "Apply" button:

Show Kanban

  • Add Kanban Junction(s) (64) to be shown (more than one junction can be shown with one action)

  • Select kanban to be shown (65)

  • Add and configure target kanban variables and their values (66)

Refresh Columns

  • Select kanban to refresh columns in (67)

  • Add columns to be refreshed (68)

  • Specify which parts of columns should be refreshed (69)

  • Select kanban to refresh columns in (70)

  • Add columns whose headers or footers are to be refreshed (71)

Hide Columns and Show Columns

  • Select kanban to hide or show columns in (72)

  • Add columns that should be hidden or shown (73)

Refresh Card

  • Add kanban(s) (74) to be refresh cards in (cards in more than one kanban can be refreshed with one action)

  • Add columns (75) which contain cards that will be refreshed (because one record can be represented by several cards in several columns)

  • Configure ID (76) of the record which card(s) will be refreshed for

Refresh Card Layout or Hide Card Layout

  • Select kanban (77) to refresh or hide card layout in

Show Card Layout

  • Select kanban (78) to refresh or hide card layout in

  • Select column (79) to show card layout for

  • Configure ID (80) of the record which layout should be shown

Refresh cell

  • Configure cell ID (81)

  • Configure column ID (82) if needed (this parameter can be omitted if user wants to refresh cells in a proper card, header or footer in all columns)

  • Configure record ID (83) to specify which card cell should be refreshed in. This parameter is optional (e.g., if user wants to refresh cell in all cards or if cell does not belong to any card).

Update cell

  • Configure cell ID (84)

  • Configure column ID (85) if needed (this parameter can be omitted if user wants to update cells in a proper card, header or footer in all columns)

  • Configure record ID (86) to specify which card cell should be updated in. This parameter is optional (e.g., if user wants to update cell in all cards or if cell does not belong to any card).

  • Configure the cell value (87) that should be updated

  • Configure the cell title (88) that should be updated (optional parameter)

  • Configure the cell styles in CSS format (89) that should be updated (optional parameter)

Last updated