nerdexam
Salesforce

PDII · Question #265

PDII Question #265: Real Exam Question with Answer & Explanation

The correct answer is B. [Select Id, Name, Amount_c FROM Credit_Memo_c WHERE Customer_Id_c = :customerId LIMIT. See the full explanation below for the reasoning.

Question

Refer to the code snippet below: A custom object called Credit_Memo_c exists in a Salesforce environment. As part of a new feature development that retrieves and manipulates this type of record, the developer needs to ensure race conditions are prevented when a set of records are modified within an Apex transaction. In the preceding Apex code, how can the developer alter the query statement to use SOQL features to prevent race conditions within a transaction?

Exhibit

PDII question #265 exhibit

Options

  • A[Select Id, Name, Amount_c FROM Credit_Memo_c WHERE Customer_Id_c = :customerId LIMIT
  • B[Select Id, Name, Amount_c FROM Credit_Memo_c WHERE Customer_Id_c = :customerId LIMIT
  • C[Select Id, Name, Amount_c FROM Credit_Memo_c WHERE Customer_Id_c = :customerId
  • D[Select Id, Name, Amount_c FROM Credit_Memo_c WHERE Customer_Id_c = :customerId LIMIT

Community Discussion

No community discussion yet for this question.

Full PDII Practice