A company has been adding data to Salesforce and has not done a good Job of limiting the creation of duplicate Lead records. The developer is considering writing an Apex process to identify duplicates and merge the records together. Which two statements are valid considerations when using merged? Choose 2 answers
Correct Answer: B,D
The merge method is an Apex Data Manipulation Language (DML) operation that allows you to combine up to three records of the same sObject type into one of the records, known as the master record. The merge method deletes the other records, known as the victim records, and reparents any related records to the master record. The merge method has the following characteristics: * Merge is supported with accounts, contacts, cases, and leads: The merge method can only be used with these four standard sObject types. You cannot use the merge method with custom objects or other standard objects. * The merge method allows up to three records, including the master and two additional records with the same sObject type, to be merged into the master record: The merge method takes an array of sObject records as the input parameter, where the first record is the master record and the rest are the victim records. The merge method can merge up to three records of the same sObject type into the master record. If you want to merge more than three records, you need to call the merge method multiple times. The other statements are not valid considerations when using the merge method: * The field values on the master record are overwritten by the records being merged: This is not true. The field values on the master record are not overwritten by the victim records, unless you explicitly specify the field names and values in the master record before calling the merge method. By default, the merge method preserves the field values of the master record and discards the field values of the victim records. * External ID fields can be used with the merge method: This is not true. The merge method does not support external ID fields as input parameters. You need to use the record IDs of the sObject records to perform the merge operation. References: Merging Records, merge method, Prepare for Your Salesforce Platform Developer I Credential
Question 137
Which control statement should a developer use to ensure that a loop body executes at least once?
Correct Answer: A
Question 138
What is the debug output of the following Apex code? Decimal theValue; System.debug (theValue);
Correct Answer: B
Question 139
A developer has a Visualforce page and custom controller to save Account records. The developer wants to display any validation rule violations to the user. How can the developer make sure that validation rule violations are displayed?