CRT-450Free trialFree trial

By salesforce
Aug, 2025

Verified

25Q per page

Question 1

Which statement results in an Apex compiler error?

  • A: Map<Id,Leas> lmap = new Map<Id,Lead>([Select ID from Lead Limit 8]);
  • B: Date d1 = Date.Today(), d2 = Date.ValueOf('2018-01-01');
  • C: Integer a=5, b=6, c, d = 7;
  • D: List<string> s = List<string>{'a','b','c');

Question 2

A developer needs to test an Invoicing system integration. After reviewing the number of transactions required for the test, the developer estimates that the test data will total about 2 GB of data storage. Production data is not required for the integration testing.
Which two environments meet the requirements for testing? (Choose two.)

  • A: Developer Sandbox
  • B: Full Sandbox
  • C: Developer Edition
  • D: Partial Sandbox
  • E: Developer Pro Sandbox

Question 3

A developer wants to store a description of a product that can be entered on separate lines by a user during product setup and later displayed on a Visualforce page for shoppers.
Which field type should the developer choose to ensure that the description will be searchable in the custom Apex SOQL queries that are written?

  • A: Text Area
  • B: Text
  • C: Text Area (Long)
  • D: Text Area (Rich)

Question 4

A developer wants multiple test classes to use the same set of test data.
How should the developer create the test data?

  • A: Reference a test utility class in each test class.
  • B: Define variables for test records in each test class.
  • C: Create a Test Setup method for each test class.
  • D: Use the SeeAllData=true annotation in each test class.

Question 5

A developer wants to display all of the picklist entries for the Opportunity StageName field and all of the available record types for the Opportunity object on a
Visualforce page.
Which two actions should the developer perform to get the available picklist values and record types in the controller? (Choose two.)

  • A: Use Schema.RecordTypeInfo returned by Opportunity.SObjectType.getDescribe().getRecordTypeInfos().
  • B: Use Schema.PicklistEntry returned by Opportunity.SObjectType.getDescribe().getPicklistValues ().
  • C: Use Schema.RecordTypeInfo returned by RecordType.SObjectType.getDescribe().getRecordTypeInfos().
  • D: Use Schema.PicklistEntry returned by Opportunity.StageName.getDescribe().getPicklistValues ().

Question 6

In order to override a standard action with a Visualforce page, which attribute must be defined in the <apex:page> tag?

  • A: pageReference
  • B: override
  • C: controller
  • D: standardController

Question 7

Which feature allows a developer to create test records for use in test classes?

  • A: Documents
  • B: WebServiceTests
  • C: HttpCalloutMocks
  • D: Static Resources

Question 8

How many levels of child records can be returned in a single SOQL query from one parent object?

  • A: 1
  • B: 3
  • C: 5
  • D: 7

Question 9

Which two declarative process automation features can be directly invoked when a field value changes on a record? (Choose two.)

  • A: Cloud Flow Designer flows
  • B: Process Builder processes
  • C: Validation rules
  • D: Workflow rules

Question 10

How can a developer warn users of SOQL governor limit violations in a trigger?

  • A: Use Messaging.SendEmail() to continue the transaction and send an alert to the user after the number of SOQL queries exceeds the limit.
  • B: Use PageReference.setRedirect() to redirect the user to a custom Visualforce page before the number of SOQL queries exceeds the limit.
  • C: Use Limits.getQueries() and display an error message before the number of SOQL queries exceeds the limit.
  • D: Use ApexMessage.Message() to display an error message after the number of SOQL queries exceeds the limit.

Question 11

Which control statement should a developer use to ensure that a loop body executes at least once?

  • A: for (init_stmt; exit_condition; increment_stmt) {ג€¦}
  • B: do {ג€¦} while (condition)
  • C: while (condition) {ג€¦}
  • D: for (variable : list_or_set) {ג€¦}

Question 12

A developer creates a custom controller and custom Visualforce page by using the code block below.

Image 1

What can the user expect to see when accessing the custom page?

  • A: a, b, b
  • B: a, b, getMyString
  • C: a, a, a
  • D: b, a, getMyString

Question 13

A developer working on a time management application wants to make total hours for each timecard available to application users. A timecard entry has a Master-
Detail relationship to a timecard.
Which approach should the developer use to accomplish this declaratively?

  • A: A Visualforce page that calculates the total number of hours for a timecard and displays it on the page
  • B: A Roll-Up Summary field on the Timecard Object that calculates the total hours from timecard entries for that timecard
  • C: A Process Builder process that updates a field on the timecard when a timecard entry is created
  • D: An Apex trigger that uses an Aggregate Query to calculate the hours for a given timecard and stores it in a custom field

Question 14

An Account trigger updates all related Contacts and Cases each time an Account is saved using the following two DML statements: update allContacts; update allCases;
What is the result if the Case update exceeds the governor limit for maximum number of DML records?

  • A: The Account save fails and no Contacts or Cases are updated.
  • B: The Account save succeeds and no Contacts or Cases are updated.
  • C: The Account save succeeds, Contacts are updated, but Cases are not.
  • D: The Account save is retried using a smaller trigger batch size.

Question 15

A company has a custom object named Region. Each Account in Salesforce can only be related to one Region at a time, but this relationship is optional.
Which type of relationship should a developer use to relate an Account to a Region?

  • A: Parent-Child
  • B: Hierarchical
  • C: Lookup
  • D: Master-Detail

Question 16

Given the code below, which three statements can be used to create the controller variable? (Choose three.)

Image 1

A.

Image 2

B.

Image 3

C.

Image 4

D.

Image 5

E.

Image 6

Question 17

How can a developer get all of the available record types for the current user on the Case object?

  • A: Use DescribeSObjectResult of the Case object.
  • B: Use SOQL to get all Cases.
  • C: Use DescribeFieldResult of the Case.RecordType field.
  • D: Use Case.getRecordTypes().

Question 18

A developer needs to create an audit trail for records that are sent to the recycle bin.
Which type of trigger is most appropriate to create?

  • A: after delete
  • B: after undelete
  • C: before undelete
  • D: before delete

Question 19

In which three areas can a Lightning component be used in the Lightning Experience? (Choose three.)

  • A: Lightning Report page
  • B: Lightning Connect page
  • C: Lightning Record Page
  • D: Lightning Community Page
  • E: Lightning Home page

Question 20

Using DescribeSObjectResult, which Apex method can a developer use to determine if the current user can edit records for an object?

  • A: canUpdate()
  • B: canEdit()
  • C: isUpdateable()
  • D: isEditable()

Question 21

A change set deployment from a sandbox to production fails due to a failure in a managed package unit test. The developer spoke with the managed package owner and they determined it is a false positive and can be ignored.
What should the developer do to successfully deploy?

  • A: Select ג€Run local testsג€ to run all tests in the org that are not in the managed package.
  • B: Select ג€Fast Deployג€ to run only the tests that are in the change set.
  • C: Select ג€Run local testsג€ to run only the tests that are in the change set.
  • D: Edit the managed package's unit test.

Question 22

A developer encounters APEX heap limit errors in a trigger.
Which two methods should the developer use to avoid this error? (Choose two.)

  • A: Use the transient keyword when declaring variables.
  • B: Query and store fields from the related object in a collection when updating related objects.
  • C: Remove or set collections to null after use.
  • D: Use SOQL for loops instead of assigning large queries results to a single collection and looping through the collection.

Question 23

Candidates are reviewed by four separate reviewers and their comments and scores which range from 1 (lowest) to 5 (highest) are stored on a review record that is a detail record for a candidate.
What is the best way to indicate that a combined review score of 15 or better is required to recommend that the candidate come in for an interview?

  • A: Use a Validation Rule on a total score field on the candidate record that prevents a recommended field from being true if the total score is less than 15.
  • B: Use a Rollup Summary field to calculate the sum of the review scores, and store this in a total score field on the candidate.
  • C: Use Visual Workflow to set a recommended field on the candidate whenever the cumulative review score is 15 or better.
  • D: Use a Workflow Rule to calculate the sum of the review scores and send an email to the hiring manager when the total is 15 or better.

Question 24

A developer needs to find information about @future methods that were invoked.
From which system monitoring feature can the developer see this information?

  • A: Scheduled Jobs
  • B: Apex Jobs
  • C: Background Jobs
  • D: Asynchronous Jobs

Question 25

When a Task is created for a Contact, how can a developer prevent the task from being included on the Activity Timeline of the Contact's Account record?

  • A: In Activity Setting, uncheck Roll up activities to a contact's primary account.
  • B: Create a Task trigger to set the Account field to NULL.
  • C: Use Process Builder to create a process to set the Task Account field to blank.
  • D: By default, tasks do not display on the Account Activity Timeline.
Page 1 of 12 • Questions 1-25 of 293

Free preview mode

Enjoy the free questions and consider upgrading to gain full access!