Salesforce Certified Platform Developer II — Question 145

A company has a custom object, Order__c, that has a required, unique, external ID field called Order_Number__c.
Which statement should be used to perform the DML necessary to insert new records and update existing records in a List of Order__c records?

Answer options

Correct answer: B

Explanation

The correct answer is B, as it specifies the use of the external ID field Order_Number__c for the upsert operation, allowing for both insertion of new records and updates to existing ones. Option A is incomplete, while options C and D are incorrect because they reference the merge operation, which is not suitable for this scenario.