PDI · Question #234
Universal Hiring uses Salesforce to capture job applications. A salesforce administrator created two custom objects; Job__c acting as the maste object, Job _Application__c acting as the detail…
The correct answer is D. Record-triggered flow. The requirement is to compare a Contact's Mailing State with a multi-select picklist on a related Job__c, display the match status on Job_Application__c, and keep it updated dynamically.
Question
Universal Hiring uses Salesforce to capture job applications. A salesforce administrator created two custom objects; Job__c acting as the maste object, Job _Application__c acting as the detail. Within the Job ___c object, a custom multi-select picklist, preferred Locations __c, contains a list of approved states for the position. Each Job_Application__c record relates to a Contact within the system through a master-detail relationship. Recruiters have requested the ability to view whether the Contact's Mailing State value matches a value selected on the Preferred_Locations__c field, within the Job_Application__c record. Recruiters would like this value to be kept in sync if changes occur to the Contact's Mailing State. What is the recommended tool a developer should use to meet the business requirement?
Options
- ARoll-up summary field
- BApex trigger
- CFormula field
- DRecord-triggered flow
How the community answered
(29 responses)- A7% (2)
- B10% (3)
- C28% (8)
- D55% (16)
Why each option
The requirement is to compare a Contact's Mailing State with a multi-select picklist on a related Job__c, display the match status on Job_Application__c, and keep it updated dynamically.
A roll-up summary field cannot perform complex comparisons between values from different related objects or handle multi-select picklist logic; it only aggregates summary data from child records.
While an Apex trigger could accomplish this, a record-triggered flow is the recommended declarative alternative when possible, as it requires less maintenance and no code.
A formula field can display real-time comparisons, but it cannot access grandchild relationships directly in this complex way, especially involving multi-select picklists, and it cannot *write* or 'keep in sync' a stored value on the record.
A record-triggered flow can be configured to execute when a Contact's Mailing State changes. It can then traverse the master-detail relationships to find related Job_Application__c records, compare the Contact's Mailing State against the Job__c's multi-select picklist, and update a field on the Job_Application__c record to reflect the match, ensuring real-time synchronization.
Concept tested: Record-triggered flows for cross-object data synchronization
Source: https://help.salesforce.com/s/articleView?id=sf.flow_ref_resources_record_triggered.htm&type=5
Topics
Community Discussion
No community discussion yet for this question.