Question 7

In a recruiting application, a Position custom object is related to a Salary custom object. Sensitive information, such as current salary, is stored on the Salary object. All users should be able to at least view position information. However, only select individuals should be able to read salary records.
How should a developer accomplish this?

Correct Answer:A

Question 8

Each setSavepoint() and rollback statement counts against the total number of DML statements.

Correct Answer:D

Question 9

A developer can use optional catch statements for any exception type in a try-catch block. However, the general exception type, 'Exception', must only be used by the last catch() block.
EXAMPLE:
try{
// Some risky code.
}
catch(SomeExceptionType e){
// Handle one exception type.
}
catch(SomeOtherExceptionType e){
// Handle another exception type.
}
catch(Exception e){
// This must be the last catch block.
}
~|~
(Select all that apply)

Correct Answer:ABE

Question 10

Which of the following statements are used to repeatedly execute a block of code until the exit condition is met?
✑ do-while loops
✑ if statements
✑ for loops
✑ if—Lhen statements

Correct Answer:A

Question 11

Universal Containers requires that all job applications have a unique code that is auto-
populated when records are created. The code must be different from the record ID. What would a developer use to accomplish this declaratively?

Correct Answer:A

Question 12

Which trigger context variable allows you to modify field values before they are written to the database in the before trigger? (No Answer)

Correct Answer:A

START DEV-501 EXAM