CRT-450 Exam Questions

Total 387 Questions

Last Updated Exam : 22-Nov-2024

Topic 2 : Exam Pool B

A developer runs the following anonymous code block:List<Account> acc = [SELECT Id FROM Account
LIMIT 10];Delete acc;Database.emptyRecycleBin(acc);system.debug(Limits.getDMLStatements()+ ‘, ‘
+Limits.getLimitDMLStatements());What is the result?


A.

11, 150


B.

150, 2


C.

150, 11


D.

2, 150





D.
  

2, 150



Which trigger event allows a developer to update fields in the Trigger.new list without using an additional
DML statement?Choose 2 answers


A.

Before insert


B.

Before update


C.

After update


D.

After insert





A.
  

Before insert



B.
  

Before update



When creating unit tests in Apex, which statement is accurate?Choose 2


A.

Unit tests with multiple methods result in all methods failing every time one method fails.


B.

Increased test coverage requires large test classes with many lines of code in one method.


C.

Triggers do not require any unit tests in order to deploy them from sandbox to production.


D.

System Assert statements that do not Increase code coverage contribute important feedback in unit tests





B.
  

Increased test coverage requires large test classes with many lines of code in one method.



D.
  

System Assert statements that do not Increase code coverage contribute important feedback in unit tests



The Review_c object have a lookup relationship to the job_Application_c object. The job_Application_c
object has a master detail relationship up to the position_c object. The relationship is based on the auto
populated defaults?
What is the recommended way to display field data from the related Review _C records a Visualforce page for a single Position_c record? Select one of the following:


A.

Utilize the Standard Controller for Position_c and cross-object Formula Fields on the Job_Application_c
object to display Review_c data.


B.

Utilize the Standard Controller for Position_c and a Controller Extension to query for Review_c data.


C.

Utilize the Standard Controller for Position_c and expression syntax in the Page to display related
Review_c through the Job_Applicacion_c inject.


D.

Utilize the Standard Controller for Position_c and cross-object Formula Fields on the Review_c object
to display Review_c data.





B.
  

Utilize the Standard Controller for Position_c and a Controller Extension to query for Review_c data.



A company has a custom object named Warehouse. Each Warehouse record has a distinct record owner, and is
related to a parent Account in Salesforce.Which kind of relationship would a developer use to relate the
Account to the Warehouse?


A.

One -to -Many


B.

Lookup


C.

Master -Detail


D.

Parent -Child





B.
  

Lookup



How can a developer retrieve all Opportunity record type labels to populate a list collection?Choose 2 answers


A.

Obtain describe object results for the Opportunity objct.


B.

Write a for loop that extracts values from the Opportunity.RecordType.Name field.


C.

Use the global variable $RecordType and extract a list from the map.


D.

Write a SOQL for loop that iterates on the RecordType object.





A.
  

Obtain describe object results for the Opportunity objct.



D.
  

Write a SOQL for loop that iterates on the RecordType object.



The Sales Management team hires a new intern. The intern is not allowed to view Opportunities, but needs to see the Most Recent Closed Date of all child Opportunities when viewing an Account record. What would a developer do to meet this requirement?


A.

Create a trigger on the Account object that queries the Close Date of the most recent Opportunities.


B.

Create a Workflow rule on the Opportunity object that updates a field on the parent Account.


C.

Create a formula field on the Account object that performs a MAX on the Opportunity Close Date field.


D.

Create a roll-up summary field on the Account object that performs a MAX on the Opportunity Close
Date field.





D.
  

Create a roll-up summary field on the Account object that performs a MAX on the Opportunity Close
Date field.



What is an accurate constructor for a custom controller named "MyController"?


A.

public MyController () { account = new Account () ; }


B.

public MyController (sObject obj) { account = (Account) obj; }


C.

public MyController (List objects) { accounts = (List ) objects; }


D.

public MyController (ApexPages.StandardController stdController) { account = (Account)
stdController.getRecord(); }





A.
  

public MyController () { account = new Account () ; }



A developer is creating a test coverage for a class and needs to insert records to validate functionality. Which
method annotation should be used to create records for every method in the test class?


A.

@BeforeTest


B.

@isTest(SeeAllData=True)


C.

@TestSetup


D.

@PreTest





C.
  

@TestSetup



A developer creates a method in an Apex class and needs to ensure that errors are handled properly.What
would the developer use? (There are three correct answers.)


A.

ApexPages.addErrorMessage()


B.

A custom exception


C.

.addError()


D.

Database.handleException()


E.

A try/catch construct





B.
  

A custom exception



C.
  

.addError()



E.
  

A try/catch construct




Page 17 out of 39 Pages
Previous