ExamGecko
Home Home / Salesforce / Certified Platform Developer II

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

Question list
Search
Search

List of questions

Search

Related questions











A developer migrated functionality from JavaScript demoting to a Lightning web component and wants to use the existing getOpportunities() method to provide data.

Which modification to the method is necessary?

A.
A The method must be decorated with ©AuraEnabled.
A.
A The method must be decorated with ©AuraEnabled.
Answers
B.
The method must return a JSON Object.
B.
The method must return a JSON Object.
Answers
C.
The method must be decorated with (cacheable=true).
C.
The method must be decorated with (cacheable=true).
Answers
D.
The method must return a String of a serialized JSON Array.
D.
The method must return a String of a serialized JSON Array.
Answers
Suggested answer: A

A custom Aura component, AddressValidation,cmp,exists in the system. The Salesforce admin for the organization is unable to find and select the component while creating a quick action for the Account sObject.

What should the developer do to ensure that AddressValidation,cmp can be selected when creating a quick action?

A.
Ensure the component implements the lightning:actionOverride interface.
A.
Ensure the component implements the lightning:actionOverride interface.
Answers
B.
Ensure the component implements the force:lighningQuickAction.interface.
B.
Ensure the component implements the force:lighningQuickAction.interface.
Answers
C.
Ensure the access attribute of the aura:component tag is st t Global.
C.
Ensure the access attribute of the aura:component tag is st t Global.
Answers
D.
Ensure the component implements the force:hasRecordedId interface.
D.
Ensure the component implements the force:hasRecordedId interface.
Answers
Suggested answer: B

Universal Containers has an existing automation where a custom record called Account Plan is created upon an Account being marked as a Customer. Recently, a Workflow Rule was added so that whenever an Account is marked as a

Customer, a 'Customer Since' date field is updated with today's date.

Now, since the addition of the Workflow Rule, two Account Plan records are created whenever the Account is marked as a Customer.

What might cause this to happen?

A.
The Apex Trigger responsible for the record creation is not bulk sate and calls insert inside of a for loop.
A.
The Apex Trigger responsible for the record creation is not bulk sate and calls insert inside of a for loop.
Answers
B.
The Apex Trigger responsible for the record creation does not use a static variable to ensure It only fires once.
B.
The Apex Trigger responsible for the record creation does not use a static variable to ensure It only fires once.
Answers
C.
The Workflow Rule responsible for the record creation fires twice because the 'Customer Since' field Update Is marked as 'Re-evaluate Workflow Rules After Field Change
C.
The Workflow Rule responsible for the record creation fires twice because the 'Customer Since' field Update Is marked as 'Re-evaluate Workflow Rules After Field Change
Answers
D.
The Process Builder responsible for the record creation fires before and after the Workflow rule.
D.
The Process Builder responsible for the record creation fires before and after the Workflow rule.
Answers
Suggested answer: C

Which statement is true regarding savepoints?

A.
Savepoints are not limited by DML statement governor limits
A.
Savepoints are not limited by DML statement governor limits
Answers
B.
You can roll back to any savepoint variable created In any order
B.
You can roll back to any savepoint variable created In any order
Answers
C.
Static variables are not reverted during a rollback.
C.
Static variables are not reverted during a rollback.
Answers
D.
Reference to savepoints can cross trigger invocations.
D.
Reference to savepoints can cross trigger invocations.
Answers
Suggested answer: C

The Salesforce instance at Universal Containers currently integrates with a third-party company to validate mailing addresses via REST services. The third-party address verification system recently changed endpoint URLs for all their set vices from https://th-addreaa-service.3pc.com to https://plc1-mailsarvice.3pc.com. Everything else remained the same. The developer updated codeto reflect this endpoint change, but the mailing address validation service stopped working after thechange.

What else should be done to complete this web service end point change?

A.
Test the callout property using HttpCalloutMock.
A.
Test the callout property using HttpCalloutMock.
Answers
B.
Add web service IP Addresses to Trusted IP Ranges m the Network Access security controls settings.
B.
Add web service IP Addresses to Trusted IP Ranges m the Network Access security controls settings.
Answers
C.
Use a Custom Setting with the new endpoint Instead of hard coding the URL.
C.
Use a Custom Setting with the new endpoint Instead of hard coding the URL.
Answers
D.
Create a new Remote Site for the new endpoint URL.
D.
Create a new Remote Site for the new endpoint URL.
Answers
Suggested answer: D

As part of their quoting and ordering process, a company needs to send PDFs to their document storage system's REST endpoint that supports OAuth 2.0. Each Salesforce user must be individually authenticated with the document storage system to send the PDF.

What is the optimal way for a developer to implement the authentication to the REST endpoint?

A.
Named Credential with an OAuth Authentication Provider
A.
Named Credential with an OAuth Authentication Provider
Answers
B.
Hierarchy Custom Setting with a password custom field
B.
Hierarchy Custom Setting with a password custom field
Answers
C.
Named Credential with Password Authentication
C.
Named Credential with Password Authentication
Answers
D.
Hierarchy Custom Setting with an OAuth token custom field
D.
Hierarchy Custom Setting with an OAuth token custom field
Answers
Suggested answer: A

Which three actions must be completed in a Lightning web component for a JavaScript file in a static resource to be loaded?

Choose 3 answers

A.
Reference the static resource in a <script> tag.
A.
Reference the static resource in a <script> tag.
Answers
B.
Import the static resource.
B.
Import the static resource.
Answers
C.
Import a method from the platformftesourceLoader,
C.
Import a method from the platformftesourceLoader,
Answers
D.
Call loadscript.
D.
Call loadscript.
Answers
E.
Append the static resource to the DOM.
E.
Append the static resource to the DOM.
Answers
Suggested answer: B, C, D

An Apex trigger creates a Contract record every time an Opportunity record is marked as Closed end Won. This trigger is working great, except (due to a recent acquisition) historical Opportunity records need to be loaded into the Salesforce instance.

When a test batch of records are loaded, the Apex trigger creates Contract records. A developer is tasked with preventing Contract records from being created when mass loading the Opportunities, but the daily users still need to have the Contract records created.

What is the most extendable way to update the Apex trigger to accomplish this?

A.
Use a List Custom Setting to disable the trigger for the user who loads the data.
A.
Use a List Custom Setting to disable the trigger for the user who loads the data.
Answers
B.
Add a Validation Rule to the Contract to prevent Contract creation by the user who loads the data.
B.
Add a Validation Rule to the Contract to prevent Contract creation by the user who loads the data.
Answers
C.
Use a Hierarchy Custom Setting to skip executing the logic inside the trigger for the user who loads the data.
C.
Use a Hierarchy Custom Setting to skip executing the logic inside the trigger for the user who loads the data.
Answers
D.
Add the Profile ID of the user who loads the data to the trigger so the trigger will not fire for this user.
D.
Add the Profile ID of the user who loads the data to the trigger so the trigger will not fire for this user.
Answers
Suggested answer: C

Customer billing data must be added and updated into Salesforce from a remote system on a weekly basis. Additionally, customer activity information must be extracted from Salesforce and put it into an on-premises data warehouse on a weekly basis.

Which approach should be used to import data into Salesforce and export data out of Salesforce, taking into consideration that these imports and exports can interfere with end-user operations during business hours and involve large amounts of data?

A.
Call-in directly from each remote system to Salesforce APIs to push and pull the data
A.
Call-in directly from each remote system to Salesforce APIs to push and pull the data
Answers
B.
Salesforce Connect to push data to and pull data from the remote systems
B.
Salesforce Connect to push data to and pull data from the remote systems
Answers
C.
Batch Apex, where Salesforce pushes data to and pulls data from the remote systems
C.
Batch Apex, where Salesforce pushes data to and pulls data from the remote systems
Answers
D.
Replication via third-party ETL to push data into Salesforce and pull data out in batches
D.
Replication via third-party ETL to push data into Salesforce and pull data out in batches
Answers
Suggested answer: B

A developer created a Lightning web component that uses a Lightning-record-edit-form to collect information about Leads. Users complain that they only see one error message at a time when they save a Lead record.

Which best practice should the developer use to perform the validations, and allow more than one error message to be displayed simultaneously?

A.
Client-side validation
A.
Client-side validation
Answers
B.
Process Builder
B.
Process Builder
Answers
C.
Apex REST
C.
Apex REST
Answers
D.
Custom validation rules
D.
Custom validation rules
Answers
Suggested answer: A
Total 408 questions
Go to page: of 41