Topic 1 : Exam Pool A
A newly hired developer discovers that there are multiple triggers on the case object.
What should the developer consider when working with triggers?
A.
Developers must dictate the order of trigger execution.
B.
Unit tests must specify the trigger being tested.
C.
Trigger execution order is not guaranteed for the same sObject.
D.
Trigger execution order is not guaranteed for the same sObject.
Developers must dictate the order of trigger execution.
Unit tests must specify the trigger being tested.
Trigger execution order is not guaranteed for the same sObject.
A developer executes the following query in Apex to retrieve a list of contacts for each account:
List<account> accounts = [Select ID, Name, (Select ID, Name from Contacts) from Account] ;
Which two exceptions may occur when it executes? (Choose two.)
A.
CPU limit exception due to the complexity of the query.
B.
SOQL query row limit exception due to the number of contacts.
C.
SOQL query limit exception due to the number of contacts.
D.
SOQL query row limit exception due to the number of accounts.
SOQL query limit exception due to the number of contacts.
SOQL query row limit exception due to the number of accounts.
In a single record, a user selects multiple values from a multi-select picklist.
How are the selected values represented in Apex?
A.
As a List<String> with each value as an element in the list
B.
As a String with each value separated by a comma
C.
As a String with each value separated by a semicolon
D.
As a Set<String> with each value as an element in the set
As a String with each value separated by a semicolon
Which two platform features align to the Controller portion of MVC architecture? (Choose two.)
A.
Process Builder actions
B.
Workflow rules
C.
Standard objects
D.
Date fields
Process Builder actions
Workflow rules
Which two Apex data types can be used to reference a Salesforce record ID dynamically? (Choose two.)
A.
ENUM
B.
sObject
C.
External ID
D.
String
ENUM
String
When is an Apex Trigger required instead of a Process Builder Process?
A.
When a record needs to be created
B.
When multiple records related to the triggering record need to be updated
C.
When a post to Chatter needs to be created
D.
When an action needs to be taken on a delete or undelete, or before a DML operation is executed.
When an action needs to be taken on a delete or undelete, or before a DML operation is executed.
What are two uses for External IDs? (Choose two.)
A.
To create relationships between records imported from an external system.
B.
To create a record in a development environment with the same Salesforce ID as in another environment
C.
To identify the sObject type in Salesforce
D.
To prevent an import from creating duplicate records using Upsert
To create relationships between records imported from an external system.
To create a record in a development environment with the same Salesforce ID as in another environment
Which two statements are true about using the @testSetup annotation in an Apex test class? (Choose two.)
A.
The @testSetup annotation cannot be used when the @isTest(SeeAllData=True) annotation is used.
B.
Test data is inserted once for all test methods in a class.
C.
Records created in the @testSetup method cannot be updates in individual test methods.
D.
The @testSetup method is automatically executed before each test method in the test class is executed.
Test data is inserted once for all test methods in a class.
Why would a developer consider using a custom controller over a controller extension?
A.
To increase the SOQL query governor limits.
B.
To implement all of the logic for a page and bypass default Salesforce functionality
C.
To leverage built-in functionality of a standard controller
To enforce user sharing settings and permissions
To implement all of the logic for a page and bypass default Salesforce functionality
Which approach should be used to provide test data for a test class?
A.
Query for existing records in the database.
B.
Execute anonymous code blocks that create data.
C.
Use a test data factory class to create test data.
D.
Access data in @TestVisible class variables.
Use a test data factory class to create test data.
Which three declarative fields are correctly mapped to variable types in Apex? (Choose three.)
A.
Number maps to Decimal.
B.
Number maps to Integer.
C.
TextArea maps to List of type String.
D.
Date/Time maps to Dateline.
E.
Checkbox maps to Boolean.
Number maps to Decimal.
Date/Time maps to Dateline.
Checkbox maps to Boolean.
How should a developer avoid hitting the governor limits in test methods?
A.
Use @TestVisible on methods that create records.
B.
Use Test.loadData() to load data from a static resource.
C.
Use @IsTest (SeeAllData=true) to use existing data.
D.
Use Test.startTest() to reset governor limits.
Use Test.startTest() to reset governor limits.
Page 3 out of 33 Pages |
Previous |