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.
|Liked this guide? Want to download this presentation as a PDF or watch training videos? We are now offering a complete course (self-paced) on Mastering Salesforce Flows. For more details and 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