Salesforce DEV501 Exam
Apex & Visualforce Controllers (Page 2 )

Updated On: 1-Feb-2026

Universal Containers has built a recruiting application with two custom objects, Job Applications and Reviews that have a master-detail relationship. Users should NOT be allowed to delete review records after job application records have been approved.
How would a developer meet this requirement?

  1. Change the interviewer's profile to Read-only for the review object
  2. Use workflow to change the page layout to Read-only
  3. Remove the Delete button from the job application page layout
  4. Use a validation rule in conjunction with a roll-up summary field

Answer(s): D



Good Apex tests should....

  1. Exercise bulk trigger functionality--use at least 20 records in your tests.
  2. Only test code using the Standard User profile.
  3. Access live organization data to validate SOQL queries and DML operations.
  4. Use the isTest annotation. Classes defined with the isTest annotation do not count against your organization limit of 3 MB for all Apex code. See IsTest Annotation.
  5. Use the runAs method to test your application in different user contexts.
  6. None of these

Answer(s): A,D,E



Although Trigger.new is a collection of records, when used as a bind variable in a SOQL query, Apex automatically....

  1. Passes the collection to the query, as long as the calling class implements the Trigger.QueryBind class.
  2. Transforms the list of records into a list of corresponding Ids.
  3. Truncates the collection so that only the Id and Name fields.
  4. Throws a DMLException with the ILLEGAL_QUERY status.
  5. Transforms the SOQL to an in-place SOSL query and returns the FIND results.
  6. None of these

Answer(s): B



A Visualforce controller is a set of instructions that specify what happens when a user interacts with the components specified in associated Visualforce markup, such as when a user clicks a button or link. Controllers also provide access to the data that should be displayed in a page, and can modify component behavior.

  1. True
  2. False

Answer(s): B



____________ is a placeholder for content that is rendered in a specific part of the parent component, such as the header or footer of an <apex:dataTable>.

  1. <apex:labelSet>
  2. <apex:customName>
  3. <c:facet>
  4. <apex:facet>
  5. <c:labelSet>
  6. None of these

Answer(s): D



Viewing page 2 of 49
Viewing questions 6 - 10 out of 239 questions



Post your Comments and Discuss Salesforce DEV501 exam prep with other Community members:

Join the DEV501 Discussion