A UXF client action is a declarative action whose Implemented as field is set to UXF Client Action. Instead of running a server script or a browser script, it executes a page-level event in UI Builder. The action’s specified payload travels with that event, and the page’s event mappings decide what happens next.
Where the UXF client action is created
Go to All > Declarative Actions > Create New Action, choose Form from the list of action types, and a new Action Assignment record opens. The action name fills in automatically from the label, in lower case with underscores in place of spaces. The Implemented as field then decides what the button does when someone clicks it.
| Implemented as value | What it applies |
|---|---|
| Server Script | JavaScript that runs on the server or against the database |
| UXF Client Action | The action as a UI Builder page event |
| Client Script | JavaScript that runs in the web browser |
| UI interaction | Runs the UI interaction chosen for the action when it is triggered |
Choose UXF Client Action when the button should hand control to a UI Builder page that is built to respond to it. The rest of the record decides where the button shows. Table sets the table it sits on, and the Global option makes it appear regardless of table. View narrows it to one UI view, and an empty View means the button appears regardless of view. Tooltip is the hover text, Description is an internal note, and Order sets the position among other actions, where a lower number sits closer to the front. Select the menu icon, then Save. The action appears on the table and view you set in the Table and View fields.
Setting the payload with Specify client action
When Implemented as is UXF Client Action, the Specify client action field becomes required. It determines the payload dispatched when the action is triggered, so it decides what the page receives. Select the search icon in the Specify client action field and pick an existing payload definition. Setting up a new payload definition is covered by the custom modal instructions, which are a separate topic.
UX Add-on Event Mappings also appears for this type. It maps the action to a UXF event on a specific page or controller, and it can remap the payload into a new structure.
Catching the event on the UI Builder page
Page-side wiring happens in UI Builder, under a user with the ui_builder_admin role. Highlight the page body, which is the top-level line in the content tree, and open the Events tab in the configuration panel. Three kinds of binding are relevant here. For the wider page-building workflow, see the UI Builder and workspaces guide.
Page event mappings respond to a page ready source event or a page property changed source event. Their handlers can update a client state parameter, set the loading state so the word Loading shows, or add, remove or clear alert notifications.
Dispatched events are declared on the page and stored in the sys_ux_event table. Each label fills in the event name and payload fields, and you can model those payload fields on a target parent event handler or define them by hand. Handled events are exposed to other users once they exist under Page event mappings, and their payload fields can come from a template, such as one that opens or closes a modal dialog.
Variant event mappings need a variant page, and their available handlers depend on that variant. They are stored in the variant record in the sys_ux_screen table. They are created automatically on save when one component’s dispatched event is mapped to another event, such as a Button clicked event mapped to a Link to destination event, which creates a dispatched relay event and a variant event mapping.
Binding a declarative action to a page
A declarative action placed on a page needs a definition first. Under Workspace Experience, open Actions & Components, then List actions, choose the table, select the Active check box, and save. Back in UI Builder, open the Configure panel, select Configure declarative action event mapping, and choose the action. Select + Add event handler, give it a name, choose the handled event to invoke, add payload values if the handler needs them, then save, select Done, and save the page. Test it by selecting the button on the page.
Reacting on the page with client state parameters
Client state parameters are page variables. A component bound to one updates whenever its value changes, so a single parameter can drive several components at once. Each parameter has a name without spaces, a type of String, Number, Boolean or JSON, and an initial value. Add one with the + Add button in the client state panel, which is collapsed by default and opens from the icon in the left navigation bar.
To bind a parameter, select the Dynamic data binding button beside a configuration field, or type @ in it. To change a parameter while the page runs, add an Update client state parameter event handler, which takes the parameter to update and its new value. A filter button is a typical case.
Page variants and the conditions that choose them
UI Builder page variants let you create different versions of a page for a specific audience. Each condition on a variant has a parameter, an operator (is, is not or starts with) and a value. Conditions can only test parameters that have already been added to the page. The Standard record template includes table and sysId as required parameters, so a variant can be set to show when a record from a table such as Task is opened with a given sys_id. AND and OR conditions can be combined, but mixing the two requires writing an encoded query. Where variants share the same conditions, the order setting decides which one applies.
Placing the action and setting who sees it
Action Configurations groups actions for an experience. For the actions to display, the corresponding form or list page has to reference that configuration. On the action assignment’s Action Configurations tab, add the configuration from the collection and save. Action Exclusions does the opposite: it defines the tables and views where the action is hidden.
Required user role names defaults to snc_internal and decides which roles can view the action. Requires read access defaults to true. Requires create access, Requires delete access and Required write access each default to false, so they restrict visibility when turned on. Enable for all Configurable Experiences defaults to false. For lists, related lists and field decorators, turning on Experience restricted limits the action to the experiences you name. For the wider model of record-level access, see the guide to access control lists.
Client Conditions are client-side rules that decide whether an action appears on attachments, field decorators and forms. A Script Condition runs on the server instead. For a form action it can use the current record, script includes and the GlideRecord API. For the related form-side rules, see the UI policy guide.
Button style and field decorators
Button type defaults to Primary and applies to lists and related lists. Group By defaults to false. When it is true, the action joins a group shown as a split button, and a Group value then has to be filled in. Field decorators are a separate action type that attaches to fields. The Decorator applies to setting chooses between a field type and one specific field. Up to three decorators can appear on one field at a time, and decorators do not support string fields that display as multi-line text at runtime.
Frequently asked questions
Is a UXF client action the same as a client script?
No. The Implemented as field lists them as separate options. A client script runs JavaScript in the browser, while a UXF client action executes a page-level event in UI Builder, and the page decides what that event does.
Why does my button not appear?
Check the Active setting first. Then confirm that the form or list page references the Action Configurations entry, that the table and view are not listed in Action Exclusions, and that the user holds one of the Required user role names. For lists and related lists, check Experience restricted as well.
Can a button appear in some experiences but not others?
Yes. Leave Enable for all Configurable Experiences off, and for lists, related lists and field decorators, turn on Experience restricted and name the experiences where the action should show.
Who needs access to set up the page side?
Binding page events in UI Builder requires the ui_builder_admin role. Creating a form action requires the admin role.