Flow for Multi-Templates
An Apex class is available to be used in any standard Salesforce Flow to recalculate the related matrix.
If your org has multi templates enabled, this Apex class lets you recalculate the matrix whenever the controlling picklist field changes.
Setting up the flow
- Go to Setup, select Flows, and click New Flow.
- In the selection screen, select Record-Triggered Flow and click Create.
- Select the object, then choose A record is updated. For the entry conditions, select All Conditions Are Met and choose the picklist field that controls the multi-template feature. Set the operator to Is Changed, the value to True, and click Done.
- On the next screen, click the + icon and search for Action.
- Search for and select the Recalculate Related Matrix Apex action.
- Give the action a name and include the input value — set the
recordIdsvariable to{$Record.Id}, then click Done. - Review the finished flow.
- Save and activate the flow.
Was this article helpful?