PDI · Question #161
An org has an existing Flow that creates an Opportunity with an Update Records element. A developer update the Flow to also create a Contact and store the created Contact's ID on the Opportunity…
The correct answer is D. Add a new Create Records element. To create a new Contact record within an existing Flow and subsequently link its ID to an Opportunity, the developer should add a 'Create Records' element.
Question
An org has an existing Flow that creates an Opportunity with an Update Records element. A developer update the Flow to also create a Contact and store the created Contact's ID on the Opportunity. Which update should the developer make in the Flow?
Options
- AAdd a new Get Records element.
- BAdd a new Update Records element.
- CAdd a new Quick Action element(of type Create).
- DAdd a new Create Records element.
How the community answered
(35 responses)- A3% (1)
- B6% (2)
- D91% (32)
Why each option
To create a new Contact record within an existing Flow and subsequently link its ID to an Opportunity, the developer should add a 'Create Records' element.
A 'Get Records' element is used to query and retrieve existing records, not to create new ones.
An 'Update Records' element is used to modify existing records, not to create new records.
A 'Quick Action' element invokes predefined quick actions, but the 'Create Records' element is the direct and declarative way to programmatically create records within a Flow.
The 'Create Records' element in a Flow is specifically used to generate new records in Salesforce. After creating the Contact, it can store the new Contact's ID in a Flow variable, which can then be used to update a lookup field on the Opportunity record.
Concept tested: Creating records in Salesforce Flows.
Source: https://help.salesforce.com/s/articleView?id=sf.flow_ref_elements_data_create.htm&type=5
Topics
Community Discussion
No community discussion yet for this question.