ExamGecko
Home Home / Salesforce / Certified Platform Developer II

Salesforce Certified Platform Developer II Practice Test - Questions Answers, Page 2

Question list
Search
Search

List of questions

Search

Related questions











A company processes Orders within their Salesforce instance. When an Order's status changes to 'Paid' it must notify the company's order management system (OMS). The OMS exposes SOAP web service endpoints to listen for when to retrieve the data from Salesforce. What is the optimal method to implement this?

A.
Create an Apex trigger and make a callout to the OMS from the trigger.
A.
Create an Apex trigger and make a callout to the OMS from the trigger.
Answers
B.
Generate the Partner WSDL and use it to make a callout to the OMS.
B.
Generate the Partner WSDL and use it to make a callout to the OMS.
Answers
C.
Create an Outbound Message that contains the session ID and send it to the OMS.
C.
Create an Outbound Message that contains the session ID and send it to the OMS.
Answers
D.
Generate the Enterprise WSDL and use it to make a callout to the OMS.
D.
Generate the Enterprise WSDL and use it to make a callout to the OMS.
Answers
Suggested answer: D

Line 1 public class AttributeTypes Line 2 { Line 3 private final String[] arrayItems; Line 4 Line 5 @AuraEnabled Line 6 public List<String> getStringArray() { Line 7 Strings+ arrayItems = new String*+, 'red', 'green', 'blue' -; Line 8 return arrayItems; Line 9 } Line 10 } Consider the Apex controller above that is called from a Lightning Aura Component. What is wrong with it?

A.
Line 1: class must be global
A.
Line 1: class must be global
Answers
B.
Lines 1 and 6: class and method must be global
B.
Lines 1 and 6: class and method must be global
Answers
C.
Line 6: method must be static
C.
Line 6: method must be static
Answers
D.
Line 8: method must first serialize the list to JSON before returning
D.
Line 8: method must first serialize the list to JSON before returning
Answers
Suggested answer: C

An Apex class does not achieve expected code coverage. The testSetup method explicitly calls a method in the Apex class. How can the developer generate the code coverage?

A.
Add @testVisible to the method in the class the developer is testing.
A.
Add @testVisible to the method in the class the developer is testing.
Answers
B.
Use system.assert() in testSetup to verify the values are being returned.
B.
Use system.assert() in testSetup to verify the values are being returned.
Answers
C.
Call the Apex class method from a testMethod instead of the testSetup method.
C.
Call the Apex class method from a testMethod instead of the testSetup method.
Answers
D.
Verify the user has permissions passing a user into System.runAs().
D.
Verify the user has permissions passing a user into System.runAs().
Answers
Suggested answer: C

A developer is trying to decide between creating a Visualforce component or a Lightning component for a custom screen. Which functionality consideration impacts the final decision?

A.
Does the screen need to be accessible from the Lightning Experience UI?
A.
Does the screen need to be accessible from the Lightning Experience UI?
Answers
B.
Will the screen make use of a JavaScript framework?
B.
Will the screen make use of a JavaScript framework?
Answers
C.
Does the screen need to be rendered as a PDF?
C.
Does the screen need to be rendered as a PDF?
Answers
D.
Will the screen be accessed via a mobile app?
D.
Will the screen be accessed via a mobile app?
Answers
Suggested answer: A

A Developer wishes to improve runtime performance of Apex calls by caching results on the client.

What is the best way to implement this?

A.
Decorate the server-side method with @AuraEnabled(cacheable=true).
A.
Decorate the server-side method with @AuraEnabled(cacheable=true).
Answers
B.
Set a cookie in the browser for use upon return to the page.
B.
Set a cookie in the browser for use upon return to the page.
Answers
C.
Decorate the server-side method with @AuraEnabled(storable=true).
C.
Decorate the server-side method with @AuraEnabled(storable=true).
Answers
D.
Call the setStorable() method on the action in the JavaScript client-side code.
D.
Call the setStorable() method on the action in the JavaScript client-side code.
Answers
Suggested answer: A

.A developer is asked to update data in an org based on new business rules. The new rules state that Accounts with the type set to 'Customer' should have a status of 'Active,' and Accounts with the type set to 'Prospect' should have a status of 'Pending.' No other changes to data should be made. Which code block will accurately meet the business requirements?

A.
A.
Answers
B.
B.
Answers
C.
C.
Answers
D.
D.
Answers
Suggested answer: D

What is a benefit of JavaScript remoting over Visualforce Remote Objects?

A.
Supports complex server-side application logic
A.
Supports complex server-side application logic
Answers
B.
Does not require any JavaScript code
B.
Does not require any JavaScript code
Answers
C.
Does not require any Apex code
C.
Does not require any Apex code
Answers
D.
Allows for specified re-render targets
D.
Allows for specified re-render targets
Answers
Suggested answer: A

A Lightning Component functions in preview mode and needs to be used inside a Lightning App Builder page, but it is not available. What change should be applied to the component?

A.
Refresh the sandbox and upgrade it to the latest API version.
A.
Refresh the sandbox and upgrade it to the latest API version.
Answers
B.
Delete the component, metadata, and Apex controller and recreate them.
B.
Delete the component, metadata, and Apex controller and recreate them.
Answers
C.
Expose it in the markup using the implements and access attributes.
C.
Expose it in the markup using the implements and access attributes.
Answers
D.
Look for errors in the logic in the JavaScript controller.
D.
Look for errors in the logic in the JavaScript controller.
Answers
Suggested answer: C

Recently a Salesforce org's integration failed because it exceeded the number of allowed API calls in a 24-hour period. The integration handles a near real-time, complex insertion of data into Salesforce.

The flow of data is as follows: ?The integration looks up Contact records with a given email address and, if found, the integration adds a Task to the first matching Contact it finds. If a match is not found, the integration looks up Lead records with a given email address and, if found, the integration adds a Task to the first matching Lead it finds. ?If a match is not found, the integration will create a Lead and a Task for that newly created Lead. What is one way in which the integration can stay near real-time, but not exceed the number of allowed API calls in a 24-hour period?

A.
Use the REST API as well as the SOAP API to effectively double the API calls allowed in a 24-hour period.
A.
Use the REST API as well as the SOAP API to effectively double the API calls allowed in a 24-hour period.
Answers
B.
write a custom Apex web service that, given an email address, does all of the logic the integration code was doing.
B.
write a custom Apex web service that, given an email address, does all of the logic the integration code was doing.
Answers
C.
Create several Apex InboundEmailHandlers to accept calls from the third-party system, thus bypassing the API limits.
C.
Create several Apex InboundEmailHandlers to accept calls from the third-party system, thus bypassing the API limits.
Answers
D.
Create an Inbound Message that, using Flow, can do all of the logic the integration code was doing.
D.
Create an Inbound Message that, using Flow, can do all of the logic the integration code was doing.
Answers
Suggested answer: C

A company wants to build a custom Lightning Component that will display a specified Account Field Set and that can only be added to the Account record page. Which design resource configuration should be used?

A.
A.
Answers
B.
B.
Answers
C.
C.
Answers
D.
D.
Answers
Suggested answer: D
Total 408 questions
Go to page: of 41