Salesforce Certified Platform Developer II Part 4
Question #: 121
Topic #: 1
A developer has written an After Update trigger on Account. A workflow rule and field update cause the trigger to repeatedly update the Account records.
How should the developer handle the recursive trigger?
- Deactivate the trigger and move the logic into a Process or Flow
B. Deactivate the workflow rule to prevent the field update from executing
C. Use a static variable to prevent the trigger from executing more than once
D. Use a global variable to prevent the trigger from executing more than once
Selected Answer: C
Question #: 122
Topic #: 1
A company wants to create a dynamic survey that navigates users through a different series of questions based on their previous responses.
What is the recommended solution to meet this requirement?
- Dynamic Record Choice
B. Lightning Process Builder
C. Visualforce and Apex
D. Custom Lightning Application
Selected Answer: A
Question #: 123
Topic #: 1
Which statement is true regarding both Flow and Lightning Process? (Choose two.)
- Can use Apex methods with the @InvocableMethod annotation
B. Are both server-side considerations in the Order of Execution
C. Can use Apex that implements the Process.Plugin interface
D. Are able to be embedded directly into Visualforce pages
Selected Answer: AB
Question #: 124
Topic #: 1
A developer has a page with two extensions overriding the Standard controller for Case.
Each extension has a method called Save. The page has a command button as defined:
What will happen when a user clicks the command button?
- All of the three Save methods will be executed
B. Save from Case Standard Controller will be executed
C. Save from CaseExtensionTwo will be executed
D. Save from CaseExtensionOne will be executed
Selected Answer: D
Question #: 125
Topic #: 1
What is a valid request for the following REST method? (Choose two.)
@HttpPost global static void myPostMethod(String sl, Integer il, Boolean bl, String 52)
- my first string <11>123 <32>my second string false
B. “my first string” 123 “my second string” false
C. sl” : “my first string”, 11″ : “123”, “b1” : “false”, “S2” : “my second string”
D. il” : 123, “S1” : “my first string”, “S2” : “my second string”, “bl” : false
Selected Answer: AD
Question #: 126
Topic #: 1
A developer wrote a Visualforce page for Sales Reps to add products to an order. The page takes a URL query parameter, productFamily, which filters the product results. The test method for the filter behavior has an assertion failing due to an incorrect number of results.
Why could the test be failing? (Choose two.)
- The test does not call Test.startTest()
B. The test does not create product data
C. The test is not run by a System Administrator
D. The test does not set the current page reference
Selected Answer: BD
Question #: 127
Topic #: 1
A developer writes the following code:
public with sharing class OrderController() public PaqeReference sendOrder() Order_c order = new Order_c insert order;
ExternalOrder externalOrder = new ExternalOrder(order); Http h = new Http(); HttpRequest req = new HttpRequest(); req.setEndpoint(‘https://www.example.org/v1/orders’); req.setMethod(‘POST’); req.setBody(JSON.serialize(externalOrder));
HttpResponse res = h.send(req); order = (ExternalOrder)JSON.deserialize(res.getBody(),ExternalOrder.class);
While testing the code, the developer receives the following error message:
System.CalloutException : You have uncommitted work pending
What should the developer do? (Choose two.)
- Use the asyncSend() method of the HTTP class to send the request in async context
B. Ensure all callouts are completed prior to executing DML statements
C. Move the web service callout into an @future method
D. Use Database.insert (order, true) to immediately commit any database changes
Selected Answer: D
Question #: 128
Topic #: 1
What is the most efficient way in Visualforce to show information based on data filters defined by an end-user for a large volume of data?
- Use the rendered condition in Visualforce to limit data based on data filters
B. Use filter conditions in a SOQL query to limit data based on data filters
C. Use an Apex controller to refine raw data based on data filters and store the result in a transient variable
D. Use an Apex controller to refine raw data based on data filters and store the result in a static variable
Selected Answer: B
Question #: 129
Topic #: 1
What is the optimal syntax for adding a link to a case in a Visualforce page? (Choose two.)
- {Icase.Name}
B. {Icase.Name}
C. (LIE{!case.Name}
D. {Icase.Name}
Selected Answer: D
Question #: 130
Topic #: 1
Which of the following standard fields are indexed? (Choose three.)
- Name
B. CreatedBy
C. SystemModStamp
D. LastModifedDdate
E. RecordType
Selected Answer: ACE
Question #: 131
Topic #: 1
Which of the following variables are not transmitted in the view state? (Choose two.)
- Private
B. Transient
C. Public
D. Static
Selected Answer: D
Question #: 132
Topic #: 1
What tool in the Developer Console contains information on SOQL query Cardinality?
- Checkpoints tab
B. Query Editor
C. Query Plan Tool
D. Log Inspector
E. View State Tab
Selected Answer: A
Question #: 133
Topic #: 1
Which of the following elements can be members of a public group? (Choose three.)
- Territories
B. Case Teams
C. Users
D. Roles
E. Profiles
Selected Answer: ACD
Question #: 134
Topic #: 1
How many Territories can an instance of salesforce have?
- 400
B. 200
C. 1000
D. 100
E. 500
Selected Answer: C
Question #: 135
Topic #: 1
In which of the following scenarios would it be acceptable to use programmatic sharing instead of declarative sharing? (Choose three.)
- Every record created by sales users needs to be visible to their respective manager
B. Poor performance when using native sharing components
C. Team functionality is required on custom objects
D. There is an existing, external system of truth for user access assignments which will continue to drive access and be integrated with salesforce
E. You need to change record access to read/write for all users utilising a lightning component
Selected Answer: BCD
Question #: 136
Topic #: 1
Which of the following annotations is the right way to invoke a single apex method?
- @InvokableMethod()
B. @InvokableAction()
C. @InvokableApex()
Selected Answer: C
Question #: 137
Topic #: 1
Invokable methods accept sObjects as parameters.
- True
B. False
Selected Answer: A
Question #: 138
Topic #: 1
The maximum view state size of a visualforce page is __________.
- 1mb
B. 256kb
C. 165kb
D. 65kb
E. 135kb
Selected Answer: D
Question #: 139
Topic #: 1
How long is field history retained?
- 18 Months
B. 12 Months
C. 24 Months
D. 6 Months
E. 36 Months
Selected Answer: D
Question #: 140
Topic #: 1
Choose the correct definition for .
- Standard Salesforce formatting, throws a specific message on a page
B. Standard Salesforce formatting, shows all errors that occur on page. Can add more messages through the “ApexPages.addMessage” function
C. A single message, without formatting, that can be associated with a specific component on the page
D. No formatting; displays all errors on a page
Selected Answer: A
Question #: 141
Topic #: 1
Choose the correct definition for .
- Standard Salesforce formatting, throws a specific message on a page
B. Standard Salesforce formatting, shows all errors that occur on page. Can add more messages through the “ApexPages.addMessage” function
C. A single message, without formatting, that can be associated with a specific component on the page
D. No formatting; displays all errors on a page
Selected Answer: D
Question #: 142
Topic #: 1
Choose the correct definition for .
- Standard Salesforce formatting, throws a specific message on a page
B. Standard Salesforce formatting, shows all errors that occur on page. Can add more messages through the “ApexPages.addMessage” function
C. A single message, without formatting, that can be associated with a specific component on the page
D. No formatting; displays all errors on a page
Selected Answer: C
Question #: 143
Topic #: 1
Choose the correct definition for .
- Allows for controller methods to be called directly from Javascript. Must be encapsulated in tags. Unlike actionSupport, these functions can be called directly from Javascript code
B. Sends an AJAX request according to the time interval you specify. If this ever gets re-rendered, it resets
C. Adds AJAX support to another component (e.g. onClick, onMouseUp, onFocus, etc.)
D. Can be associated with an AJAX request (actionFunction/actionSupport/actionPoller) and shows content conditionally depending on the status of the request (in progress/complete). Use the “id” field to specify name; use “status” field on related components to connect them
E. Signifies which components should be processed by the server when an AJAX request is generated
Selected Answer: A
Question #: 144
Topic #: 1
Choose the correct definition for .
- Allows for controller methods to be called directly from Javascript. Must be encapsulated in tags. Unlike actionSupport, these functions can be called directly from Javascript code
B. Sends an AJAX request according to the time interval you specify. If this ever gets re-rendered, it resets
C. Adds AJAX support to another component (e.g. onClick, onMouseUp, onFocus, etc.)
D. Can be associated with an AJAX request (actionFunction/actionSupport/actionPoller) and shows content conditionally depending on the status of the request (in progress/complete). Use the “id” field to specify name; use “status” field on related components to connect them
E. Signifies which components should be processed by the server when an AJAX request is generated
Selected Answer: B
Question #: 145
Topic #: 1
Choose the correct definition for .
- Allows for controller methods to be called directly from Javascript. Must be encapsulated in tags. Unlike actionSupport, these functions can be called directly from Javascript code
B. Sends an AJAX request according to the time interval you specify. If this ever gets re-rendered, it resets
C. Adds AJAX support to another component (e.g. onClick, onMouseUp, onFocus, etc.)
D. Can be associated with an AJAX request (actionFunction/actionSupport/actionPoller) and shows content conditionally depending on the status of the request (in progress/complete). Use the “id” field to specify name; use “status” field on related components to connect them
E. Signifies which components should be processed by the server when an AJAX request is generated
Selected Answer: C
Question #: 146
Topic #: 1
What is the transaction limit for the number of records for SOQL queries?
- 5,000
B. 20,000
C. 50,000
D. 10,000
E. There is no limit
Selected Answer: C
Question #: 147
Topic #: 1
What is the transaction limit for the number of records using QueryLocator?
- 50,000
B. 50,000,000
C. 100,000
D. 5,000,000
E. There is no limit
Selected Answer: B
Question #: 148
Topic #: 1
What is the transaction limit for the number of SOSL queries?
- 20
B. 2,000
C. 100 (synchronous), 200 (async)
D. 200 (synchronous), 100 (async)
E. There is no limit
Selected Answer: A
Question #: 149
Topic #: 1
What is the transaction limit for the number of records for SOSL?
- 20
B. 2,000
C. 100 (synchronous), 200 (async)
D. 200 (synchronous), 100 (async)
E. There is no limit
Selected Answer: B
Question #: 150
Topic #: 1
What is the transaction limit for the number of DML statements allowed?
- 20
B. 2,000
C. 100 (synchronous), 200 (async)
D. 200 (synchronous), 100 (async)
E. 150
Selected Answer: E
Question #: 151
Topic #: 1
What is the transaction limit for the number of records per DML statement?
- 5,000
B. 20,000
C. 50,000
D. 10,000
E. There is no limit
Selected Answer: D
Question #: 152
Topic #: 1
What is the transaction limit on the number of callouts?
- 100
B. 150
C. 50
D. 200
E. There is no limit
Selected Answer: A
Question #: 153
Topic #: 1
What is the transaction limit on the number of @future invocations?
- 100
B. 150
C. 50
D. 200
E. There is no limit
Selected Answer: D
Question #: 154
Topic #: 1
What is the transaction limit on the number of Apex jobs added to the queue?
- 100
B. 150
C. 50
D. 200
E. There is no limit
Selected Answer: D
Question #: 155
Topic #: 1
What is the transaction limit on the max Salesforce CPU time?
- 100 seconds
B. 60 seconds
C. 100 seconds (synchronous); 200 seconds (async)
D. 10 seconds (synchronous); 60 seconds (async)
E. There is no limit
Selected Answer: C
Question #: 156
Topic #: 1
Which of the following object types can be used with a Web Service?
- Maps
B. Sets
C. Pattern objects
D. Matcher objects
E. Lists
F. Exception objects
Selected Answer: C
Question #: 157
Topic #: 1
What is the best way to display field-level error messages in Lightning?
- ui:inputDefaultError
B. ui:outputText
C. aura:component
D. apex:message
Selected Answer: C
Question #: 158
Topic #: 1
When testing batch classes, what must a developer do? (Choose two.)
- Use seeAllData=true
B. Encapsulate code in Test.startTest() and Test.stopTest()
C. Call the class’ “execute” method
D. Limit the amount of records you test to < 200
Selected Answer: BC
Question #: 159
Topic #: 1
Where in a query can you use Geolocation and Distance? (Choose two.)
- Select clause
B. Filter clause
C. Order By clause
D. Group By clause
Selected Answer: BC
Question #: 160
Topic #: 1
If you wanted to create a record following the update of another (with data from the source object), what is the most customizable approach?
- Workflow Rule
B. Process Builder
C. After update Trigger
D. Flow
Selected Answer: D