This example shows how a flow can be used to save a document to a record.
Note: Save Document action type can only be added to flows with base entity with document storage ability.
Save Document to a Travel Request for Colombia. In order to accomplish this, we need to configure a flow which is triggered when a travel request to Colombia is submitted.
Log in to application.
Go to Configuration and select Flows.
Click on the New Flow button to create a flow.
Note: Automating Record Creation requires permission to view, edit and create flow.
Enter a name for your flow (required), Definition (optional) on the Flow Definition page and click the Save button.
Once the flow has been saved, click on the + sign to create a version.
Select a Launch Entity as Travel Destination, Launch Event as Field Updated and Trigger as Last Modified Date.
Click on New Step Button.
Enter a name for the step and save.
Add a rule to the newly created step:
Travel Destination - Destination Country - Country Name = Colombia (since we want to save document to travel request Colombia).
Click on the New Action Button and Select Save Document from the drop-down list.
Enter a name for the Action Type, select report to be attached from the Report drop -down and select a report type.
Save your changes
Activate the flow.
Note: You can only save document in the form of a report with merged template through a flow. Other documents or reports without merged document will not show up in the document drop-down
Use Case to trigger this flow:
Create a Travel Request with Destination to Columbia and submit.
This triggers the flow and saved document will attached to the travel request submitted for Columbia.
This document can be seen from the Travel Request summary page.
Note: Travel Request with Destination Country other than Columbia will not trigger the flow.
Note: Once an Action Type is created, it may not be deleted if it is used by other records.