This guide will explain how to delete a file in Salesforce using the “Salesforce Delete Record” field.
Use Case 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.
- Configuring The “Salesforce Lookup” Field:
- Click the pencil icon of the “Salesforce Lookup” field.
- Set “Object” and “Display Additional Fields” as shown below.
- 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.
- 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.
Optional: You can add a button label.
- Test Your Form:
- Try your form.
- Find a file in the Lookup field.
- Clicking the “Delete Record” button will delete that file from the Salesforce.
Use Case 2-
- Initial Setup (Page 1):
- Drag and drop a “File Upload” field onto your form.
- Rename the field as needed.
- 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.
- 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”.
- 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.
Optional: You can add a button label.
- Test Your Form:
- Upload a file on the first page.
- Clicking the delete button on the second page will delete the file from Salesforce.
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. 🙂