Loading
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
          Delete an Object Record from an Omniscript

          Delete an Object Record from an Omniscript

          Enable users to delete one or more sObject records by using the Delete Action. Use an Object's Record Id to determine which record to delete. The best practice is to use a merge field to refer to an Id or a list of IDs in the data JSON.

          1. Preview the Omniscript and identify the JSON path for the record.

            For example, this data JSON contains a list of accounts.

              {
                "Account": [
                  {
                    "accId": ["001f400000EPQ8o", "001f400000BAkbn"]
                  }
                ]
              }	
          2. In the Delete Action properties, click Add sObject to Delete.
            1. From the Type of sObject dropdown, select an Object.
            2. In the Path to Id field, enter the JSON path for the record id using merge field syntax.
              Using the Account example, the path to delete the array of Account ids is: %Account:accId%.
            3. If required, select Fail operation if any records aren’t deleted.
              In the designer for a managed package, the check box is All or None.
          3. Enable users to confirm the deletion of a record by configuring these fields in the Confirmation Modal section:
            1. To display a confirmation modal before deleting the record, select Display confirmation modal.
              In the designer for a managed package, select Confirm.
            2. Enter the message to be displayed in the confirmation modal.
            3. If necessary, provide button labels for confirm and cancel actions.
          4. Display messages when the operation succeeds or fails by configuring these fields in the Error Messages section:
            1. In the Deleted Record Message field, enter a message that displays when a record is deleted.
              In the designer for a managed package, enter the message in the Entity Is Deleted Message field.
            2. In the Invalid ID Message field, enter a message that displays when an invalid Id is sent to the Delete Action.
            3. In the Deletion Failed Message field, enter a message that displays when the action fails to delete a record.
            4. In the Configuration Error Message field, enter a message that displays when the Delete Action has a configuration error.
           
          Loading
          Salesforce Help | Article