Salesforce Fact #355 | Check converted account in record-triggered flow
Suppose we have a use case where we need to differentiate when an account record is created, whether it is an account created from lead conversion or not. The logic is to be checked in record-triggered flow on account.
Now, to achieve this we can create a field on account which would store the company of the lead getting converted. Also, on Lead we can create one formula field to store the company field value. The idea is, company is a required field on Lead and it would always have some value when the lead is getting converted. So, we can define a mapping from the Lead company formula field to the custom field created on account.
In the record-triggered flow, we can check whether the value of the custom field is populated or not to determine whether this is a converted account.
Note: The custom field on account is only for the lead conversion purpose and need to be exposed in the UI, and also should not be updated from anywhere else.
In this example, we are updating the description of the account accordingly whether it is a converted account or not.
Attached are the screenshots.
Additionally or Optionally can we use the record.isConverted property for checking whether Lead is converted or not
ReplyDeleteYes. you can.
ReplyDelete