Pass4itsure > Salesforce > Salesforce Developer > PDII > PDII Online Practice Questions and Answers

PDII Online Practice Questions and Answers

Questions 4

Line 1 public class AttributeTypes Line 2 { Line 3 private final String[] arrayItems; Line 4 Line 5 @AuraEnabled Line 6 public List 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

B. Lines 1 and 6: class and method must be global

C. Line 6: method must be static

D. Line 8: method must first serialize the list to JSON before returning

Buy Now
Questions 5

A custom Visualforce controller calls the ApexPages.addMessage() method, but no messages are rendering on the page.

Which component should be added to the Visualforce page to display the message?

A.

B.

C.

D.

Buy Now
Questions 6

A developer is writing a complex application involving triggers, workflow rules, Apex classes, and processes. The developer needs to carefully consider the order of execution when developing the application.

1.

Before Triggers

2.

After Triggers

3.

Post commit logic such as sending email

4.

DML committed to the database

5.

Workflow rules

6.

Roll-up summary calculations

In what order do the following operations execute?

A. 1,2,5,6,4,3

B. 1,5,6,2,4,3

C. 1,2,4,5,6,3

D. 1,6,5,2,4,3

Buy Now
Questions 7

Which of the following elements can be members of a public group? (Choose three.)

A. Territories

B. Case Teams

C. Users

D. Roles

E. Profiles

Buy Now
Questions 8

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().

B. Create a custom event from the parent component to set the property.

C. Move the logic from connectedCallback() nto renderedCallback().

D. Move the logic to a getter/setter pair.

Buy Now
Questions 9

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 code to reflect this endpoint change, but the mailing address validation service stopped working

after the change.

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

A. Test the callout property using HttpCalloutMock.

B. Add web service IP Addresses to Trusted IP Ranges m the Network Access security controls settings.

C. Use a Custom Setting with the new endpoint Instead of hard coding the URL.

D. Create a new Remote Site for the new endpoint URL.

Buy Now
Questions 10

A developer is building a Lightning web component to get data from an Apex method called getData that takes a parameter, name. The data should be retrieved when the user clicks the Load Data button.

Exhibit.

What must be added to get the data?

A. Add @wire(getData, (name: $name')} to the account field and this, account = getData ( ) ; to t loadData ( ) function.

B. Add this, account = getData (this,name); to the loadData ( ) function.

C. Add getData ({ name; this,name}) , then (result=> { this.account = result}) to the LeadData ( ) function.

D. Add @wire(getData, {name: $name'}) to the account field and delete loadData ( ) because it is not needed.

Buy Now
Questions 11

Universal Containers needs to integrate with their own, existing, internal custom web application. The web application accepts JSON payloads, resizes product images, and sends the resized images back to Salesforce. What should the developer use to implement this integration?

A. A workflow rule with an outbound message that contains a session ID

B. An Apex trigger that calls an @future method that allows callouts

C. A platform event that makes a callout to the web application

D. A flow that calls an @future method that allows callouts

Buy Now
Questions 12

A developer created a JavaScript library that simplifies the development of repetitive tasks and features and uploaded the library as a static resource called jsUtils in Salesforce. Another developer is coding a new Lightning web component (LWC) and wants to leverage the library.

Which statement properly loads the static resource within the LWC?

A.

B. import {jsUtilities} from `@salesforce/resourceUrl/jsUtils';

C. import jsUtilities from `@salesforce/resourceUrl/jsUtils';

D. const jsUtility = $A.get (`$Resource.jsUtils');

Buy Now
Questions 13

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

What is the recommended approach to perform validations on more than one field, and display multiple error messages simultaneously with minimal JavaScript intervention?

A. Try/catch/finally block

B. Apex trigger

C. Validation rules

D. External JavaScript library

Buy Now
Exam Code: PDII
Exam Name: Salesforce Certification for Platform Developer II
Last Update: May 10, 2024
Questions: 425
10%OFF Coupon Code: SAVE10

PDF (Q&A)

$45.99

VCE

$49.99

PDF + VCE

$59.99