Delete File (6 min)
Completion requirements
01 Getting Started
This tutorial shows how to delete a file.
Make sure that there is a file attached to the Salesforce object.
Make sure that there is a file attached to the Salesforce object.
02 Configure your Canvas
1. Click the + icon to open the element list.
2. Under Input, drag-and-drop a text field element to the canvas.
3. Under Input, drag-and-drop an email element to the canvas.
4. Under Buttons, drag-and-drop a button to the canvas.
![Screenshot of example project](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/802877828/1.1.png)
2. Under Input, drag-and-drop a text field element to the canvas.
3. Under Input, drag-and-drop an email element to the canvas.
4. Under Buttons, drag-and-drop a button to the canvas.
![Screenshot of example project](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/802877828/1.1.png)
03 Custom Variable
1. Click the Gear icon to open the project Settings screen.
2. Under Tools, click the Custom Variable option’s Gear icon.
![Screenshot of Titan project settings](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/889031118/1.2.png)
3. Under Static, add a custom variable called “contactid”.
4. Click the Kebab icon and select the Map to URL checkbox.
5. Add another variable called “contentdocumentid”. Click the Apply button.
![Screenshot of Custom Variables window displaying Static tab](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/889031118/2.png)
2. Under Tools, click the Custom Variable option’s Gear icon.
![Screenshot of Titan project settings](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/889031118/1.2.png)
3. Under Static, add a custom variable called “contactid”.
4. Click the Kebab icon and select the Map to URL checkbox.
5. Add another variable called “contentdocumentid”. Click the Apply button.
![Screenshot of Custom Variables window displaying Static tab](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/889031118/2.png)
04 Salesforce Integration
1. Click the Gear icon to open the Project Settings and click the Salesforce option. The Salesforce Integration screen opens.
2. Click the Create New button. The Map Salesforce fields screen opens.
![Screenshot showing how to navigate to the Salesforce Integration window](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/46525507/3.png)
3. Under Object Settings, use the drop-down list to select the Salesforce object.
4. Use the drop-down list to select the trigger to execute the pull.
![Screenshot of Map Salesforce Fields window showing Object Settings tab](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/46525507/4.png)
5. Click the Conditions option and configure the condition using the drop-down lists. The Field value is the static variable you added.
![Screenshot of Map Salesforce Fields window showing Conditions tab](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/46525507/5.png)
6. Click the Mapping option and use the drop-down list to map the Full name and the Email to the elements.
![Screenshot of Map Salesforce Fields window showing Mapping tab](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/46525507/6.png)
7. Click the Apply button. The Salesforce integration is added.
8. Click the Kebab icon and select the Add Child option. The Map Salesforce field screen opens.
![Screenshot of Salesforce Integration window displaying how to create a child get](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/46525507/7.png)
9. Under Object Settings, use the drop-down list to select the Content Version Salesforce object.
10. Select the Up to Radio button and add 10 in the records field.
![Screenshot of Map Salesforce Fields window showing Object Settings tab](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/46525507/8.png)
11. Under Conditions, configure the conditions. The First Published Location ID must equal the Contact ID.
![Screenshot of Map Salesforce Fields window showing Conditions tab](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/46525507/9.png)
12. Click the Mapping option and use the drop-down list to map the field as follows:
![Screenshot of Map Salesforce Fields window showing Mapping tab](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/46525507/10.png)
13. Click the Apply button. The child integration is added. Click the Close button.
![Screenshot showing Salesforce Integration window displaying get Record tab showing clustered get record](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/46525507/11.png)
2. Click the Create New button. The Map Salesforce fields screen opens.
![Screenshot showing how to navigate to the Salesforce Integration window](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/46525507/3.png)
3. Under Object Settings, use the drop-down list to select the Salesforce object.
4. Use the drop-down list to select the trigger to execute the pull.
![Screenshot of Map Salesforce Fields window showing Object Settings tab](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/46525507/4.png)
5. Click the Conditions option and configure the condition using the drop-down lists. The Field value is the static variable you added.
![Screenshot of Map Salesforce Fields window showing Conditions tab](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/46525507/5.png)
6. Click the Mapping option and use the drop-down list to map the Full name and the Email to the elements.
![Screenshot of Map Salesforce Fields window showing Mapping tab](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/46525507/6.png)
7. Click the Apply button. The Salesforce integration is added.
8. Click the Kebab icon and select the Add Child option. The Map Salesforce field screen opens.
![Screenshot of Salesforce Integration window displaying how to create a child get](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/46525507/7.png)
9. Under Object Settings, use the drop-down list to select the Content Version Salesforce object.
10. Select the Up to Radio button and add 10 in the records field.
![Screenshot of Map Salesforce Fields window showing Object Settings tab](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/46525507/8.png)
11. Under Conditions, configure the conditions. The First Published Location ID must equal the Contact ID.
![Screenshot of Map Salesforce Fields window showing Conditions tab](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/46525507/9.png)
12. Click the Mapping option and use the drop-down list to map the field as follows:
- [GV/contentdocumentid] to ContentDocumentID
![Screenshot of Map Salesforce Fields window showing Mapping tab](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/46525507/10.png)
13. Click the Apply button. The child integration is added. Click the Close button.
![Screenshot showing Salesforce Integration window displaying get Record tab showing clustered get record](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/46525507/11.png)
05 Condition
1. Click the Gear icon to open the project Settings screen.
2. Under Tools, click the Custom Variable option’s Gear icon.
![Screenshot of Titan project settings](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/294121376/12.png)
3. Under Conditions, double-click the Condition node. The Edit Node screen opens.
![Screenshot of Custom Variables window displaying Conditions tab](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/294121376/13.png)
4. Configure the rule:
![Screenshot of Edit Node screen showing how to configure the condition](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/294121376/14.png)
5. Click the Next button.
6. Add a tag if necessary and click the Save button.
7. Hover over the Condition node with your mouse and click the + icon. The Add Node screen opens.
![configure conditions for custom variables](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/294121376/15.png)
8. Click the Salesforce Action option and click the Next button.
![Screenshot of Add Node window showing selected Salesforce Actions node](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/294121376/16.png)
9. Use the Process push or get dropdown list to select the Salesforce integration. Click the Next button.
![Screenshot of Add Node Salesforce Action window showing the selected action](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/294121376/17.png)
10. Add a tag if necessary and click the Insert button. The Salesforce Action is added to the screen. Click the Apply button.
![Screenshot of Custom Variables window displaying Conditions tab](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/294121376/17.1.png)
2. Under Tools, click the Custom Variable option’s Gear icon.
![Screenshot of Titan project settings](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/294121376/12.png)
3. Under Conditions, double-click the Condition node. The Edit Node screen opens.
![Screenshot of Custom Variables window displaying Conditions tab](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/294121376/13.png)
4. Configure the rule:
- [GV/contactid] Is not empty
![Screenshot of Edit Node screen showing how to configure the condition](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/294121376/14.png)
5. Click the Next button.
6. Add a tag if necessary and click the Save button.
7. Hover over the Condition node with your mouse and click the + icon. The Add Node screen opens.
![configure conditions for custom variables](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/294121376/15.png)
8. Click the Salesforce Action option and click the Next button.
![Screenshot of Add Node window showing selected Salesforce Actions node](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/294121376/16.png)
9. Use the Process push or get dropdown list to select the Salesforce integration. Click the Next button.
![Screenshot of Add Node Salesforce Action window showing the selected action](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/294121376/17.png)
10. Add a tag if necessary and click the Insert button. The Salesforce Action is added to the screen. Click the Apply button.
![Screenshot of Custom Variables window displaying Conditions tab](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/294121376/17.1.png)
06 Preview with Debug
1. Open the Project Settings and make sure that the Debug option under Tools is on.
![Screenshot of the Titan project settings showing how to enable debug mode](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/886343455/18.png)
2. Click the Preview button.
3. Open Salesforce and copy the contact ID from the URL bar.
![Screenshot of Salesforce URL bar](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/886343455/19.png)
4. In the URL bar of the previewed project, delete the “device=lg” and add the following:
6. Click the Debug button. The Debug project screen opens.
You will see the contentdocumentid:
7. Close the Debug project screen and return to the Web project.
8. Open the Project Settings and click on the Salesforce option. The Salesforce Integration screen opens.
9. Click the Push option and click the Create New button.
10. Use the drop-down list to select the Content Document.
11. Use the Action drop-down list to select Delete.
12. Select the following radio buttons:
![Screenshot of Map Salesforce Fields showing the Object Settings tab](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/886343455/22.png)
13. Under Conditions, configure the conditions. The ContentDocumentID must equal the contentdocumentid.
14. Click the Apply button. The Salesforce integration is added to the screen. Click the Close button.
![Screenshot of the Salesforce Integrations window showing My Push tab](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/886343455/22.2.png)
![Screenshot of the Titan project settings showing how to enable debug mode](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/886343455/18.png)
2. Click the Preview button.
3. Open Salesforce and copy the contact ID from the URL bar.
![Screenshot of Salesforce URL bar](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/886343455/19.png)
4. In the URL bar of the previewed project, delete the “device=lg” and add the following:
- ?contactid=
6. Click the Debug button. The Debug project screen opens.
![Screenshot of the debug button in preview mode](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/886343455/20.png)
You will see the contentdocumentid:
![Screenshot of debug mode preview](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/886343455/21.png)
7. Close the Debug project screen and return to the Web project.
8. Open the Project Settings and click on the Salesforce option. The Salesforce Integration screen opens.
9. Click the Push option and click the Create New button.
![Screenshot of Salesforce Integration screen displaying push tab](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/886343455/21.1.png)
10. Use the drop-down list to select the Content Document.
11. Use the Action drop-down list to select Delete.
12. Select the following radio buttons:
- If there are multiple records, take the ID from: All
- If no match is found: Skip
![Screenshot of Map Salesforce Fields showing the Object Settings tab](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/886343455/22.png)
13. Under Conditions, configure the conditions. The ContentDocumentID must equal the contentdocumentid.
![Screenshot of Map Salesforce Fields showing the Conditions tab](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/886343455/22.1.png)
14. Click the Apply button. The Salesforce integration is added to the screen. Click the Close button.
![Screenshot of the Salesforce Integrations window showing My Push tab](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/886343455/22.2.png)
07 Add OnClick Action
1. Select the Delete Files button and click the On Click Action icon.
2. Hover with your mouse pointer over the Start node and click the + icon. The Add Node screen opens.
3. Select the Salesforce Action node and click the Next button.
4. Use the Process push or get drop-down list to select the Content Document Delete Salesforce integration. Click the Next button.
5. Add a tag if necessary and click the Insert button. The Salesforce Action is added to the screen. Click the Apply button.
6. Save the project and refresh the webpage.
7. Click the Delete Files button.
You can refresh the Salesforce page to see that the file was deleted or open the Salesforce Integration logs:
![Screenshot of Salesforce Integrations window](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/246248459/26.png)
![Screenshot of button menu with interactivity icon highlighted](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/246248459/23.png)
2. Hover with your mouse pointer over the Start node and click the + icon. The Add Node screen opens.
![Screenshot of on Click Action window showing add node button](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/246248459/24.png)
3. Select the Salesforce Action node and click the Next button.
![Screenshot of the Add Node window with the Salesforce Action node selected](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/246248459/25.png)
4. Use the Process push or get drop-down list to select the Content Document Delete Salesforce integration. Click the Next button.
![Screenshot showing how to select the configured Salesforce action](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/246248459/25.1.png)
5. Add a tag if necessary and click the Insert button. The Salesforce Action is added to the screen. Click the Apply button.
6. Save the project and refresh the webpage.
7. Click the Delete Files button.
You can refresh the Salesforce page to see that the file was deleted or open the Salesforce Integration logs:
![Screenshot of Salesforce Integrations window](https://academy.titandxp.com/pluginfile.php/645/mod_custompage/topics/246248459/26.png)