#salesforce #summer24 #salesforceflow
The Requirement:
Our goal is straightforward: create a Contact record using a Screen Flow. Additionally, we'll integrate this flow seamlessly into the Account lightning record page, ensuring users can effortlessly add contacts to associated accounts.
Steps to Achieve this Requirement:
1. Create a New Screen Flow: Navigate to Flows, click on "New Flow," and select "Screen Flow" as the flow type.
2. Design the Screen Layout: Add a screen action and drag relevant sections onto the flow canvas to display contact creation fields to users. In this case, we include fields like Name, Phone, and Email.
3. Configure Record Creation Component: Add the "Create Records" component to the flow. Specify the object (Contact) and map the values entered by the user from the previous screen component to the corresponding contact fields.
4. Mapping the Account: To associate the newly created contact with the account, create a resource with the text data type and mark it as "Available for input." This allows passing the Account ID from the lightning record page to the flow.
5. Save and Activate the Flow: Once the flow is designed and configured, save it and activate it for use.
6. Integrate with the Account Lightning Record Page: Edit the Account record page, drag the Flow component onto the desired location, and save the page.
7. Test the Flow: Return to the Account record page, enter the required contact details in the flow, and proceed. Verify that the new contact is successfully created and associated with the Account.