ExamGecko
Ask Question

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

List of questions

Question 11

Report
Export
Collapse

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?

Create an Apex trigger and make a callout to the OMS from the trigger.
Create an Apex trigger and make a callout to the OMS from the trigger.
Generate the Partner WSDL and use it to make a callout to the OMS.
Generate the Partner WSDL and use it to make a callout to the OMS.
Create an Outbound Message that contains the session ID and send it to the OMS.
Create an Outbound Message that contains the session ID and send it to the OMS.
Generate the Enterprise WSDL and use it to make a callout to the OMS.
Generate the Enterprise WSDL and use it to make a callout to the OMS.
Suggested answer: D
asked 23/09/2024
Stelios Mantas
27 questions

Question 12

Report
Export
Collapse

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?

Line 1: class must be global
Line 1: class must be global
Lines 1 and 6: class and method must be global
Lines 1 and 6: class and method must be global
Line 6: method must be static
Line 6: method must be static
Line 8: method must first serialize the list to JSON before returning
Line 8: method must first serialize the list to JSON before returning
Suggested answer: C
asked 23/09/2024
Carolina Velayos
49 questions

Question 13

Report
Export
Collapse

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?

Add @testVisible to the method in the class the developer is testing.
Add @testVisible to the method in the class the developer is testing.
Use system.assert() in testSetup to verify the values are being returned.
Use system.assert() in testSetup to verify the values are being returned.
Call the Apex class method from a testMethod instead of the testSetup method.
Call the Apex class method from a testMethod instead of the testSetup method.
Verify the user has permissions passing a user into System.runAs().
Verify the user has permissions passing a user into System.runAs().
Suggested answer: C
asked 23/09/2024
Joshua Muentes
46 questions

Question 14

Report
Export
Collapse

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?

Does the screen need to be accessible from the Lightning Experience UI?
Does the screen need to be accessible from the Lightning Experience UI?
Will the screen make use of a JavaScript framework?
Will the screen make use of a JavaScript framework?
Does the screen need to be rendered as a PDF?
Does the screen need to be rendered as a PDF?
Will the screen be accessed via a mobile app?
Will the screen be accessed via a mobile app?
Suggested answer: A
asked 23/09/2024
Sathiyaraj Arulprakasam
47 questions

Question 15

Report
Export
Collapse

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

What is the best way to implement this?

Decorate the server-side method with @AuraEnabled(cacheable=true).
Decorate the server-side method with @AuraEnabled(cacheable=true).
Set a cookie in the browser for use upon return to the page.
Set a cookie in the browser for use upon return to the page.
Decorate the server-side method with @AuraEnabled(storable=true).
Decorate the server-side method with @AuraEnabled(storable=true).
Call the setStorable() method on the action in the JavaScript client-side code.
Call the setStorable() method on the action in the JavaScript client-side code.
Suggested answer: A
asked 23/09/2024
Mohsin Raza
43 questions

Question 16

Report
Export
Collapse

.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?

Suggested answer: D
asked 23/09/2024
Sergio Monsegur Torralba
31 questions

Question 17

Report
Export
Collapse

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

Supports complex server-side application logic
Supports complex server-side application logic
Does not require any JavaScript code
Does not require any JavaScript code
Does not require any Apex code
Does not require any Apex code
Allows for specified re-render targets
Allows for specified re-render targets
Suggested answer: A
asked 23/09/2024
Wasawatt Ch
39 questions

Question 18

Report
Export
Collapse

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?

Refresh the sandbox and upgrade it to the latest API version.
Refresh the sandbox and upgrade it to the latest API version.
Delete the component, metadata, and Apex controller and recreate them.
Delete the component, metadata, and Apex controller and recreate them.
Expose it in the markup using the implements and access attributes.
Expose it in the markup using the implements and access attributes.
Look for errors in the logic in the JavaScript controller.
Look for errors in the logic in the JavaScript controller.
Suggested answer: C
asked 23/09/2024
Justin NJOCK
45 questions

Question 19

Report
Export
Collapse

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?

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

Question 20

Report
Export
Collapse

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?

Suggested answer: D
asked 23/09/2024
Himanshu Sachdeva
36 questions
Total 438 questions
Go to page: of 44
Search

Related questions