DEX-403 practice question 33 of 35

An App Builder is loading the data into salesforce. To link the new records back to the legacy system, a field will be used to track the legacy ID on the account object. For future data loads this ID will be used when upserting records. Which field attribute should be selected? Choose 2 answers

Full set: 291 questions
Answer options
A: Unique Correct answer
B: Required
C: External ID Correct answer
D: Text (encrypted)
Correct Answer:
A. Unique; C. External ID
Explanation

To use a field from a legacy system for upsert operations, the field in Salesforce must be designated as an External ID. The upsert DML operation uses this specific attribute to match incoming records against existing records in Salesforce. If a match is found, the record is updated; otherwise, a new record is created. Additionally, to ensure data integrity and prevent errors during the upsert process, the External ID field should also be marked as Unique. If multiple Salesforce records share the same External ID value, the upsert operation will fail for that value, as Salesforce cannot determine which single record to update.

Why Incorrect

B. Required: Making the field required enforces a business rule for data completeness but is not technically necessary for the upsert operation to function on records that do have the ID.
D. Text (encrypted): Encrypted fields cannot be marked as External IDs. The encryption process prevents the database from indexing the field's values, which is essential for the efficient matching required by an upsert operation. ---

References

1. Salesforce Help Documentation, "Custom Field Attributes":

External ID Attribute: "Select this option to mark the field as an external ID on an object. An external ID field contains record identifiers from a system outside of Salesforce... When you use the API or import tools to upsert custom object, parent, or child records, you can use this field to prevent duplicates."

Unique Attribute: "Select this option to disallow duplicate values in a field... External ID fields must have the Unique attribute." This explicitly links the two required attributes for this use case.

2. Salesforce Developer Documentation, Apex Developer Guide, "DML Operations", "Upserting Records":

"The upsert DML operation creates new records and updates existing records in one call. upsert uses a specified field to determine the presence of existing objects, or the external ID field if a field is not specified." This confirms the central role of an External ID field in the upsert process.

3. Salesforce Help Documentation, "Prepare for Your Import":

"For an upsert operation, if you don't use the record ID to match records, use a custom field with the External ID and Unique attributes as the record-matching key." This provides clear guidance on preparing for data loads that use upsert.

Scroll to Top