ExamGecko
Home Home / Salesforce / Certified Platform Developer II

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

Question list
Search
Search

List of questions

Search

Related questions











A lead developer is creating tests for a Lightning web component. The component re-renders when a property called bypassSelection. changes its value.

What should the developer use to the test that the component re-renders successfully when the property changes?

A.
Promise. resolve ( )
A.
Promise. resolve ( )
Answers
B.
dispatchEvent (new CustomEvent (' bypassSelection'))
B.
dispatchEvent (new CustomEvent (' bypassSelection'))
Answers
C.
Windows, Setinterval ( )
C.
Windows, Setinterval ( )
Answers
D.
Windows, set State ( )
D.
Windows, set State ( )
Answers
Suggested answer: C

The head of recruiting at Universal Containers wants to provide all internal users the ability to search for open positions by role, department, and location via a new recruiting app, In addition to search, users of the app should be able to refer a fried, apply for a position, and review the status of their current submissions. The app should be made available in Salesforce Mobile, but offline access is not required.

Given these requirements, what is the recommended approach to developer the app?

A.
Visualforce
A.
Visualforce
Answers
B.
Lightning Web Components
B.
Lightning Web Components
Answers
C.
Lightning Experience Builder
C.
Lightning Experience Builder
Answers
D.
Salesforce SDK
D.
Salesforce SDK
Answers
Suggested answer: D

Which tag should a developer use to display different text while an <apex:commandButton> is executing versus not executing?

A.
<apexactionPoller>
A.
<apexactionPoller>
Answers
B.
<ApexactionSupper>
B.
<ApexactionSupper>
Answers
C.
<ApexactionStatus>
C.
<ApexactionStatus>
Answers
D.
<ApexpageMessages>
D.
<ApexpageMessages>
Answers
Suggested answer: C

Refer to the code snippet below:

When a Lightning web component is rendered, a list of opportunity that match certain criteria should be retrieved from the database and displayed to the end-user.

Which three considerations must the developer implement to make the fetchOpps method available within the Lightning web component?

A.
The fetchOpps method must be annotated with the @InvocableMethod annotation.
A.
The fetchOpps method must be annotated with the @InvocableMethod annotation.
Answers
B.
The fetchOpps method must specify the (continustion-true) attribute
B.
The fetchOpps method must specify the (continustion-true) attribute
Answers
C.
The fetchOpps method cannot mutate the result set retrieved from the database.
C.
The fetchOpps method cannot mutate the result set retrieved from the database.
Answers
D.
The fetchOpps method must specify the (cacheable =true) attribute
D.
The fetchOpps method must specify the (cacheable =true) attribute
Answers
E.
The fecthOpps method must be annotated with the @ AuraEnabled annotation.
E.
The fecthOpps method must be annotated with the @ AuraEnabled annotation.
Answers
Suggested answer: C, D, E

A developer 15 tasked with creating an application-centric feature on which end-users can access and update information. This feature must be available in lightning Experience while working seamlessly in multiple device form factors, such as desktops, phones, and tablets. Additionally, the feature must support Addressable URL Tabs and interact with the Salesforce Console APIs.

What arm two approaches a developer can take to build the application and support the business requirements?

Choose 2 answers

A.
Create the application using Aura Components wrapped in Lightning Web Components.
A.
Create the application using Aura Components wrapped in Lightning Web Components.
Answers
B.
Create the application using Lightning web Components wrapped in Aura Components.
B.
Create the application using Lightning web Components wrapped in Aura Components.
Answers
C.
Create application using Aura Components.
C.
Create application using Aura Components.
Answers
D.
Create the application using Lightning Experience Builder.
D.
Create the application using Lightning Experience Builder.
Answers
Suggested answer: B, C

Refer to the markup below:

A Lightning web component displays the Account name and two custom fields out of 275 that exist on the object. The developer receives complaints that the component performs slowly.

What can the developer do to improve the performance?

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

A developer has a Visual force page that automatically assign ownership of an Account to a queue save. The page appears to correctly assign ownership, but an assertion validating the correct ownership fails.

What can cause this problem?

A.
The test class does not use the Bulk API for loading test data.
A.
The test class does not use the Bulk API for loading test data.
Answers
B.
The test class does not retrieve the updated value from the database.
B.
The test class does not retrieve the updated value from the database.
Answers
C.
The test class does not use the seeAllData=true annotation,
C.
The test class does not use the seeAllData=true annotation,
Answers
D.
The test class does not implement the Queueabfe interface.
D.
The test class does not implement the Queueabfe interface.
Answers
Suggested answer: B

Refer to the code snippet below:

A custom object called Credit_Memo_c exist in a Salesforce environment. As part of a new feature development that retrieves and manipulates this type of record, the developer needs to ensure race conditions are prevented when a set of records are modified within an Apex transaction.

In the preceding Apex code, how can the developer alter the query statement to use SOQL features to prevent race condition within a transaction?

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

A company recently deployed a Visualforce page with a custom controller that has a data grid of information about Opportunities in the org.

Users report that they receive a "Maximum view state size limit" error message under certain conditions.

According to Visualforce best practice, which three actions should the developer take to reduce the view state? Choose 3 answers

A.
Use the transient keyword in the Apex controller for variables that do not maintain state.
A.
Use the transient keyword in the Apex controller for variables that do not maintain state.
Answers
B.
Use the final keyword In the controller for variables that will not change.
B.
Use the final keyword In the controller for variables that will not change.
Answers
C.
Refine any SQQL queries to return only data relevant to the page.
C.
Refine any SQQL queries to return only data relevant to the page.
Answers
D.
Use the private keyword in the controller for variables
D.
Use the private keyword in the controller for variables
Answers
E.
Use filters and pagination to reduce the amount of data.
E.
Use filters and pagination to reduce the amount of data.
Answers
Suggested answer: C, D, E

Assuming the CreateOneAccount class creates one account and implements the Queuetable interface, which syntax tests the Apex code?

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