Launching Flow
Using the Custom Actions feature, you can also call a Flow (Visual Workflow) developed in Salesforce from the Sheet.
Since you can pass the information of the selected records in the sheet to the flow as input variables, you can freely create logic to process the selected records at once.
For more information on how to set up custom actions to initiate a flow, see "Start Flow".
Example of Launching a Flow
In this example, we'll take a flow that extends the close date by a specified number of months for a collection of Opportunity records, as an example of launching a flow from the Sheet.
The flow included in this sample is available for installation as a package. The URL for the package is here.
In this flow, a record-type collection variable named Opportunities
is defined as a variable that can be used as input. Internally, it adds a specified number of months to the close date for each record received in this variable, and then updated in batches.
Details of the Opportunities
variable can be found in the Toolbox under "Manager" > "Resources" > "Record Collection Variables".
To add the action to start a flow to a sheet, choose "Setting" from the sheet menu and click the "Actions" tab. Click the Add Action button and select "Custom" > "Start Flow" action. Specify "Postpone Close Date" as the display label for the added action button.
Click the "Detail Setting" link to display the Detail Action Setting dialog. In the dialog, enter PostponeOppCloseDate
, which is the API reference name of the previous flow, into the "Flow API Name" field.
In addition, click "Add Input Variable" to specify the input variables. Enter the name of the input variable as Opportunities
, select the data type as "Record", and select the value as "Selected Records".
Finally, check "Reload records after the flow finished" and click "Apply" to finish setting up the action.
When the setting of the action is complete, a "Postpone Close Date" button will be placed at the bottom right of the sheet.
If you click this button with opportunity records selected, a dialog for the flow is displayed with a screen that asks you to enter the number of months to add to the close date, according to the definition of the flow.
When you enter the number of months and click "Next", the flow will be resumed and the close date of the selected opportunity records will be updated with the date added for the specified number of months. You will see that the records in the sheet are automatically updated when the flow is completed.
Restrictions on Launching a Flow
Following restriction applies to flows that can be launched from Mashmatrix Sheet.
The screen definition of the screen flow must not contain any sections. Currently, Mashmatrix Sheet does not support sections.
Launching a flow that contains a "File Upload" component in the flow screen is currently not supported in Mashmatrix Sheet.
Last updated