Notes
In Salesforce's Flow Builder, the recordId is a system variable that represents the unique identifier of a record within a particular object. It is often used to reference and manipulate the data of a specific record in a flow. Flows are a visual way to automate and guide business processes, and the recordId variable plays a crucial role in interacting with records within these processes.
When you create or run a flow in Salesforce, the recordId variable is automatically populated based on the context in which the flow is initiated. For example, if you trigger a flow from a record detail page, the recordId variable will be set to the ID of that particular record. This allows you to perform actions and make updates specific to that record.
Some common use cases of the recordId variable in Flow Builder include:
Updating Record Data: You can retrieve the data of the record associated with the recordId and update its fields using the "Record Update" element in the flow.
Displaying Record Information: You can display the record's information, such as its fields, related lists, and related records, in a flow screen.
Creating Related Records: You can create related records (child records) for the record associated with the recordId using the appropriate flow elements.
Record-Triggered Flows: When a record meets certain criteria, you can use an "Record-Triggered Flow" to perform actions on that record, leveraging the recordId variable.
Custom Actions: You can use buttons, links, or other custom actions to initiate a flow and pass the recordId as a parameter to perform specific operations on the record.
It's important to note that the recordId is automatically available as a system variable in Flow Builder, and you don't need to explicitly define or set its value. Additionally, the availability and behavior of the recordId might differ depending on where and how the flow is initiated (e.g., from a record detail page, list view, custom button, etc.).
In summary, the recordId variable in Flow Builder allows you to work with and manipulate the data of a specific record within Salesforce, making it a fundamental element in building automated processes and interactions around your organization's data.