ExamGecko
Home Home / Salesforce / Certified Platform Developer II

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

Question list
Search
Search

List of questions

Search

Related questions











Universal Containers (UC) currently does not development in its full copy sandbox.

Recently, UC has projects that require multiple developers to develop concurrently. UC is running into issues with developers making changes that cause errors In work done by other developers.

Additionally, when they are ready to deploy, many unit tests fail which prevents the deployment. which three types of orgs should be recommended to UC to eliminate these problems?

Choose 3 answers

A.
Data Migration org
A.
Data Migration org
Answers
B.
Development org
B.
Development org
Answers
C.
Staging org
C.
Staging org
Answers
D.
Systems Integration org
D.
Systems Integration org
Answers
E.
Continuous Integration (CI) Org
E.
Continuous Integration (CI) Org
Answers
Suggested answer: A, C, E

A developer is creating a Lightning web component that contains a child component. The property stage is being passed from the parent to the child. The public property is changing, but the setOppList function is not being invoked.

What should the developer change to allow this?

A.
Move the logic from connectedCalIback() to constructor().
A.
Move the logic from connectedCalIback() to constructor().
Answers
B.
Create a custom event from the parent component to set the property.
B.
Create a custom event from the parent component to set the property.
Answers
C.
Move the logic from connectedCallback() nto renderedCallback().
C.
Move the logic from connectedCallback() nto renderedCallback().
Answers
D.
Move the logic to a getter/setter pair.
D.
Move the logic to a getter/setter pair.
Answers
Suggested answer: D

A developer creates a Lightning web component to allow a Contact to be quickly entered- However, error messages are not displayed.

Which component should the developer add to the form to display error messages?

A.
apex:messages
A.
apex:messages
Answers
B.
aura:messages
B.
aura:messages
Answers
C.
lightning-messages
C.
lightning-messages
Answers
D.
lightning-error
D.
lightning-error
Answers
Suggested answer: C

Universal Containers needs to integrate with an external system. The process is initiated when a record is created in Salesforce. The remote system does not require Salesforce to wait for a response before continuing.

What should the developer use to accomplish this?

A.
Trigger with HTTP callout
A.
Trigger with HTTP callout
Answers
B.
PushTopic event
B.
PushTopic event
Answers
C.
Outbound message
C.
Outbound message
Answers
D.
Platform event
D.
Platform event
Answers
Suggested answer: A

As part of a new integration, a developer is asked to implement a new custom search functionality that is capable of performing unrestricted queries and can account for all values within a custom picklist field, type__z, on the Opportunity object. The search feature must also account for NULL values.

The organization-wide default for the Opportunity object is set to Public Read-Only, and a new custom index has. been created for the Type__c field. There are more than 5 million Opportunity records within the environment. and a considerable amount of the existing records have NULL values for the picklist Which technique should the developer implement to maximize performance when querying NULL values?

A.
Create a formula field that substitutes NULL values for a string of text, create an index for the formula field, then use the formula within the WHERE clause.
A.
Create a formula field that substitutes NULL values for a string of text, create an index for the formula field, then use the formula within the WHERE clause.
Answers
B.
Perform two SOQL queries; one to query Opportunities where Type__c - NULL, and another to query where Type_: - HBLL, then join the result set using Apex.
B.
Perform two SOQL queries; one to query Opportunities where Type__c - NULL, and another to query where Type_: - HBLL, then join the result set using Apex.
Answers
C.
Use a SOSL query to return ALL opportunities that have a value of NULL in any field.
C.
Use a SOSL query to return ALL opportunities that have a value of NULL in any field.
Answers
D.
Use the OS operator to combine WHERE clauses to strictly search for each value within the picklist, including Type__c ' NULL.
D.
Use the OS operator to combine WHERE clauses to strictly search for each value within the picklist, including Type__c ' NULL.
Answers
Suggested answer: B

A developer wrote an Apex method to update a list of Contacts and wants to make it available for use by Lightning web components.

Which annotation should the developer add to the Apex method to achieve this?

A.
@AuraEnabled
A.
@AuraEnabled
Answers
B.
@RemoteAction
B.
@RemoteAction
Answers
C.
@RemoteAction(cacheable=true)
C.
@RemoteAction(cacheable=true)
Answers
D.
@AuraEnable
D.
@AuraEnable
Answers
Suggested answer: D

Refer to the code below:

When the code runs, it results In a System Limit Exception with the error message: Apex heap size too large.

What should be done to fix this error'

A.
Use a SOQL for loop to process the data.
A.
Use a SOQL for loop to process the data.
Answers
B.
Convert the Lis: into a 5tc.
B.
Convert the Lis: into a 5tc.
Answers
C.
Use Limits.getLimitHeapSize().
C.
Use Limits.getLimitHeapSize().
Answers
D.
Use a try/catch block to catch the error.
D.
Use a try/catch block to catch the error.
Answers
Suggested answer: C

A developer created a Lightning web component that allows users to input a text value that is used to search for Accounts by calling an Apex method. The Apex method returns a list of AccountWrappers and is called imperatively from a JavaScript event handler.

Which two changes should the developer make so the Apex method functions correctly?

Choose 2 answers

A.
Add @AuraEnafcle3 to line 09.
A.
Add @AuraEnafcle3 to line 09.
Answers
B.
Add @AuraEnabled to line 03.
B.
Add @AuraEnabled to line 03.
Answers
C.
Add @AuraEnabled to lines 11 and 12.
C.
Add @AuraEnabled to lines 11 and 12.
Answers
D.
Add @AuraEnat:ei to line 01.
D.
Add @AuraEnat:ei to line 01.
Answers
Suggested answer: B, C

A developer created an Apex class that updates an Account based on input from a Lightning web component that is used to register an Account. The update to the Account should only be made if it has not already been registered.

What should the developer do to ensure that users do not overwrite each other's updates to the same Account if they make updates at the same time?

A.
Use CastiCase.update(account, false).
A.
Use CastiCase.update(account, false).
Answers
B.
Add a try/catch block around the update.
B.
Add a try/catch block around the update.
Answers
C.
Use upsert instead of update.
C.
Use upsert instead of update.
Answers
D.
Use FOR UPDATE in a SOQL query.
D.
Use FOR UPDATE in a SOQL query.
Answers
Suggested answer: A

An org has a Process Builder process on Opportunity that sets a custom field,CommissionBaseAmount__c, when an Opportunity is edited and the Opportunity's Amount changes.

A developer recently deployed an Opportunity before update trigger that uses the CommissionBaseAmount__c and complex logic to calculate a value for a custom field CommissionAmount_c, when an Opportunity stage changes to Closed/Won.

Users report that when they change the Opportunity to Closed/Won and also change the Amount during the same save, the C:rr.i;5icnA.T.cur.t c is incorrect.

Which two actions should the developer take to correct this problem? Choose 2 answers

A.
Call the trigger from the process.
A.
Call the trigger from the process.
Answers
B.
Uncheck the recursion checkbox on the process.
B.
Uncheck the recursion checkbox on the process.
Answers
C.
Use a static Boolean variable in the trigger.
C.
Use a static Boolean variable in the trigger.
Answers
D.
Call the process from the trigger.
D.
Call the process from the trigger.
Answers
Suggested answer: A, C
Total 408 questions
Go to page: of 41