Delete a Salesforce File

This guide will explain how to delete a file in Salesforce using the “Salesforce Delete Record” field.

Use Case 1-

  1. Initial Setup:
  • Drag and drop a “Salesforce Lookup”, a “Salesforce Delete Record”, and a “Field Update Button” field onto your form.
  • Rename the fields as needed.
image
  1. Configuring The “Salesforce Lookup” Field:
  • Click the pencil icon of the “Salesforce Lookup” field.
  • Set “Object” and “Display Additional Fields” as shown below.
image
  1. Configuring The “Salesforce Delete Record” Field:
  • Click the pencil icon of the “Salesforce Delete Record” field.
  • Add “Salesforce Object Name” and “Salesforce Record Id Field” as shown below.
  • Here, d20a-0e24-c359 is the field ID of the “Salesforce Lookup” field.
image
  1. Configuring The “Field Update Button” Field:
  • Click the pencil icon of the “Field Update Button” field.
  • Set “Field Updates” - Delete a File || event || run
  • Save the changes.
image

Optional: You can add a button label.

image
  1. Test Your Form:
  • Try your form.
  • Find a file in the Lookup field.
image
  • Clicking the “Delete Record” button will delete that file from the Salesforce.
image

Use Case 2-

  1. Initial Setup (Page 1):
  • Drag and drop a “File Upload” field onto your form.
  • Rename the field as needed.
image
  1. Initial Setup (Page 2):
  • Drag and drop a “Salesforce Delete Record”, and a “Field Update Button” field onto your form.
  • Rename the fields as needed.
image
  1. Configuring The “Salesforce Delete Record” Field:
  • Click the pencil icon of the “Salesforce Delete Record” field.
  • Add “Salesforce Object Name” and “Salesforce Record Id Field” as shown below.
  • Here, a8ed-ed1d-ee1d is the field ID of the “File Upload” field.
  • Note: For the “Salesforce Object Name” option, please use the “ContentVersion” if we use Parent Record ID while uploading a file, else use the “ContentDocument”.
image
  1. Configuring The “Field Update Button” Field:
  • Click the pencil icon of the “Field Update Button” field.
  • Set “Field Updates” - Delete a File || event || run
  • Save the changes.
image

Optional: You can add a button label.

image
  1. Test Your Form:
  • Upload a file on the first page.
image
  • Clicking the delete button on the second page will delete the file from Salesforce.
image
Example Form Use Case 1.json4.9KB
Example Form Use case 2.json7.3KB

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