You are here:
Add, Edit, and Delete Records with Edit Block Actions
Enable users to add, edit, and delete records by using Edit Block's default remote actions. To add custom functionality, configure additional actions.
Edit Block supports these actions:
-
HTTP Action
-
Integration Procedure Action
-
Remote Action
Word wrap isn't supported in an Edit Block.
- Create, Edit, and Delete Records with Default Actions and sObject Mapping
Add sObject Mapping functionality by adding Remote Actions to the Edit Block for each option you want to make available to the User. These Remote actions will access Apex classes built for the Edit Block and the sObject Mapping tool. The Default Actions use the sObject mapping property to determine how the entries map to an sObject. - Add Custom Actions to an Omniscript Edit Block
Add custom actions to include additional functionality in your Edit Block. - Add Global Actions to an Omniscript Edit Block
Run actions on the entire JSON for the Edit Block by adding global actions. Global actions display outside of the Edit Block entries.
Create, Edit, and Delete Records with Default Actions and sObject Mapping
Add sObject Mapping functionality by adding Remote Actions to the Edit Block for each option you want to make available to the User. These Remote actions will access Apex classes built for the Edit Block and the sObject Mapping tool. The Default Actions use the sObject mapping property to determine how the entries map to an sObject.
-
To allow a user to create entries, edit entries, or delete entries:
- Add a Remote Action to the Edit Block.
-
Configure the Edit Block using the Element naming convention, Class, and
Method for each of these table entries:
Element Name
Class
Method
(Edit Block Element Name)-New
DefaultOmniScriptEditBlock
new
(Edit Block Element Name)-Edit
DefaultOmniScriptEditBlock
edit
(Edit Block Element Name)-Delete
DefaultOmniScriptEditBlock
delete
-
Map the Edit Block entries to Salesforce objects by using the SOBJECT MAPPING
property. Fields hidden from the user, such as an Id, remain available for mapping.
To add mapping entries to the Edit Block:
- Click SObject Mapping to expand the section.
- Click Select Object and select a Salesforce object.
- Add an SObject Field Mapping.
-
In the Edit Block Element field, select the name of an element that is in the
Edit Block.
Note
By default, new entries are added, and existing entries are updated. To create a record instead of updating an existing one, select Duplicate Key.
-
In the sObject field, select an sObject field. The element will map to this
field.
Note
You must add a Text element to store the ID of the record in the Edit Block. The element containing the
record Idmust map to the sObject's ID field in the SObject Mapping section. To hide the element from displaying in the UI, see Using the Hide Property on Omniscript Components.
Add Custom Actions to an Omniscript Edit Block
Add custom actions to include additional functionality in your Edit Block.
To add a custom action:
- Add an action element into the Edit Block.
- Name the element. Actions in the Edit Block will appear in the dropdown beneath the default actions by default.
-
To have an action replace the default New, Edit, or Delete actions, name the Action
element, and append the action type.
Replace Action
Example Element Name
New
AddUserNew
Edit
ChangeAddressEdit
Delete
RemoveAccountDelete
- Add a Label to the Action.
- Configure the Action.
Add Global Actions to an Omniscript Edit Block
Run actions on the entire JSON for the Edit Block by adding global actions. Global actions display outside of the Edit Block entries.
- Add an action element into the Edit Block.
- Name the element and append Global to the element name.
- Add a label to the action.
- Configure the action.

