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
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.
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
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.
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++) {…}
for (Account theAccount : AccountList) {…}
for(AccountList) {…}
Page 11 out of 78 Pages |
Previous |