Delete Records Without Submitting The Form (Offline & Online)

This guide will explain how to delete a record without submitting the form, whether you're online or offline.

Setup for Offline Use:

  1. Initial Setup:
  • Drag and drop a ”Salesforce Lookup” field onto your form.
  • Rename the field as needed.
image
  • Drag and drop two “Text”, an “Email”, a “Salesforce Offline Record Update”, and a “Field Update Button” field inside a “Repeat” field onto your form.
  • Rename the fields as needed.
image
  • Add a new page on your form.
  • Drag and drop a ”Salesforce Lookup” field.
  • Rename the field as needed.
image
  1. Configuring The “Salesforce Lookup” Field:
  • Click the pencil icon of the “Salesforce Lookup” field.
  • Set “Object” and “Display Additional Fields”.
image
  1. Configuring The “Salesforce Offline Record Update” Field:
  • Click the pencil icon of the “Salesforce Offline Record Update” field.
  • Add the “Select Salesforce Field” and “Record ID” options.
  • Add the “Record Lookup” field (Second page) under the “Select Salesforce Field” option.
  • Here, 23f1-724b-a30d is the field ID of the Contact ID field.
image
  • Paste the code for field mapping:
image
  • Please use this example code:
{
  "attributes": {
    "type": "Contact"
  },
  "Name": "{{6691-f96b-52a4}}",
  "Id": "{{23f1-724b-a30d}}",
  "AccountId": "{{f540-b445-84e9}}"
}
  • Please make sure to update the field IDs as per your form.
  • Here, 6691-f96b-52a4 is the field ID of the Full Name (Text) field. 23f1-724b-a30d is the field ID of the Contact ID (Text) field. f540-b445-84e9 is the field ID of the Select Account (Lookup) field.
image
  • Enable the “Delete Offline Record” option.
image
  1. Configuring The “Field Update Button” Field:
  • Click the pencil icon of the “Field Update Button” field.
  • We will use this button to trigger the “Salesforce Offline Record Update” field.
  • Add “Field Updates”:
  • Salesforce Offline Record Update || event || run

image
  1. Configuring The “Salesforce Lookup” Field On Second Page:
  • Click the pencil icon of the “Salesforce Lookup” field.
  • Set “Object” and “Display Additional Fields”.
image
  1. Test Your Form:
  • Find an account.
  • It will display the related contacts.
image
  • Expand a record.
  • Click “Delete Record” and click the “Delete” button.
  • It will delete the record.
image
  • Then click “Next” to go to the next page.
  • Search for that deleted contact.
  • You will not be able to find that contact as it is deleted.
image
  1. Connection Setup(optional):

Setup for Online Use

  1. Initial Setup:
  • Drag and drop a “Salesforce Delete Record” field outside the Repeat field at the very bottom of the form.
  • Rename the field as needed.
image
  1. Configuring The “Salesforce Delete Record ” Field:
  • Click the pencil icon of the “Salesforce Delete Record ” field.
  • Add “Salesforce Object Name”, “Salesforce Record ID”, and “Repeat Group For Entry Deletion” options.
  • Here, 23f1-724b-a30d is the field ID of the Contact ID (Text) field.
  • bb9c-93f8-189a is the field ID of the Repeat field.

image

Note: In this example, we are using the Repeat prefill to prefill the related contacts in the Repeat group. Please check out this guide: https://guides.formyoula.com/public-guides/salesforce-child-record-auto-fill-using-repeat-groups

Example Form.json15.3KB

For any questions, please contact us - [email protected] or the Formyoula in-app chat. 🙂