Uploading Files through Screen Flow is a bit tricky. We can’t use ‘Create Record’ element like we can for creating other records. And then we can’t even make the file upload mandatory like we can make other fields mandatory in Screen Flow.
This is a question that was asked by one of our Mastering Salesforce Flows course participants and since the solution is not very straight forward, we thought of documenting the whole solution in a step-by-step guide format and share with everyone.
Here’s the business requirement
- Create a Flow to create a record with Attachments (Files)
- Make the file upload mandatory
- If the user does not upload the file, then delete the record that was created
And here is the Flow design. Step-by-step with screenshots.
Want to download this PDF or watch a training video? We are now offering a complete course on Salesforce Flows called “Mastering Salesforce Flows”. To find out more about the course and watch a free preview, please click here.
References & Useful URLs:
- Helpe Article – Flow Screen Input Component: File Upload (5 mins) – https://help.salesforce.com/s/articleView?id=sf.flow_ref_elements_screencmp_fileupload.htm&type=5