CRT-450 Exam Questions

Total 387 Questions

Last Updated Exam : 16-Dec-2024

Topic 1 : Exam Pool A

What is a benefit of using an after insert trigger over using a before insert trigger?


A.

An after insert trigger allows a developer to bypass validation rules when updating fields on the new
record.


B.

An after insert trigger allows a developer to insert other objects that reference the new record.


C.

An after insert trigger allows a developer to make a callout to an external service.


D.

An after insert trigger allows a developer to modify fields in the new record without a query





B.
  

An after insert trigger allows a developer to insert other objects that reference the new record.



Using the Schema Builder, a developer tries to change the API name of a field that is referenced in an Apex test class. What is the end result?


A.

The API name is not changed and there are no other impacts.


B.

The API name of the field and the reference in the test class is changed.


C.

The API name of the field is changed, and a warning is issued to update the class.


D.

The API name of the field and the reference in the test class is updated.





C.
  

The API name of the field is changed, and a warning is issued to update the class.



A lead object has a custom field Prior_Email__c. The following trigger is intended to copy the current Email into the Prior_Email__c field any time the Email field is changed: 

Which type of exception will this trigger cause?


A.

A null reference exception


B.

A compile time exception


C.

A DML exception


D.

A limit exception when doing a bulk update





C.
  

A DML exception



While writing a test class that covers an OpportunityLineItem trigger, a Developer is unable to create a
standard PriceBook since one already exists in the org.
How should the Developer overcome this problem?


A.

Use Test.getStandardPricebookId() to get the standard PriceBook ID.


B.

Use @IsTest(SeeAllData=true) and delete the existing standard PriceBook.


C.

Use Test.loadData() and a Static Resource to load a standard Pricebook.


D.

Use @TestVisible to allow the test method to see the standard PriceBook.





A.
  

Use Test.getStandardPricebookId() to get the standard PriceBook ID.



What are two valid options for iterating through each Account in the collection List<Account> named AccountList? (Choose two.)


A.


for (Account theAccount : AccountList) {…}


B.

for(AccountList) {…}


C.

for (List L : AccountList) {…}


D.

for (Integer i=0; i < AccountList.Size(); i++) {…}





A.
  


for (Account theAccount : AccountList) {…}



B.
  

for(AccountList) {…}



Which approach should a developer take to automatically add a “Maintenance Plan” to each Opportunity that includes an “Annual Subscription” when an opportunity is closed?


A.

Build a OpportunityLineItem trigger that adds a PriceBookEntry record.


B.

Build an OpportunityLineItem trigger to add an OpportunityLineItem record.


C.

Build an Opportunity trigger that adds a PriceBookEntry record.


D.

Build an Opportunity trigger that adds an OpportunityLineItem record.





D.
  

Build an Opportunity trigger that adds an OpportunityLineItem record.



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





B.
  

A Roll-Up Summary field on the Timecard Object that calculates the total hours from timecard entries
for that timecard



A developer needs to join data received from an integration with an external system with parent records in
Salesforce. The data set does not contain the Salesforce IDs of the parent records, but it does have a foreign
key attribute that can be used to identify the parent.
Which action will allow the developer to relate records in the data model without knowing the Salesforce ID?


A.

Create and populate a custom field on the parent object marked as Unique.


B.

Create a custom field on the child object of type External Relationship.


C.

Create and populate a custom field on the parent object marked as an External ID.


D.

Create a custom field on the child object of type Foreign Key.





D.
  

Create a custom field on the child object of type Foreign Key.



When an Account’s custom picklist field called Customer Sentiment is changed to a value of “Confused”, a
new related Case should automatically be created.
Which two methods should a developer use to create this case? (Choose two.)


A.

Process Builder


B.

Apex Trigger


C.

Custom Button


D.

Workflow Rule





A.
  

Process Builder



B.
  

Apex Trigger



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’);





D.
  

List<string> s = List<string>{‘a’,‘b’,‘c’);




Page 6 out of 39 Pages
Previous