Loading
Feature degradation | Gmail Email delivery failureRead More
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Add, Edit, and Delete Records with Edit Block Actions

          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

          Note
          Note

          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.

          1. To allow a user to create entries, edit entries, or delete entries:
            1. Add a Remote Action to the Edit Block.
            1. 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

          2. 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:
            1. Click SObject Mapping to expand the section.
            2. Click Select Object and select a Salesforce object.
            3. Add an SObject Field Mapping.
            4. In the Edit Block Element field, select the name of an element that is in the Edit Block.
              Note
              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.

            5. In the sObject field, select an sObject field. The element will map to this field.
              Note
              Note

              You must add a Text element to store the ID of the record in the Edit Block. The element containing the record Id must 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:

          1. Add an action element into the Edit Block.
          2. Name the element. Actions in the Edit Block will appear in the dropdown beneath the default actions by default.
          3. 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

          4. Add a Label to the Action.
          5. 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.

          1. Add an action element into the Edit Block.
          2. Name the element and append Global to the element name.
          3. Add a label to the action.
          4. Configure the action.
           
          Loading
          Salesforce Help | Article