Pre-Summer Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: validbest

Pass the Salesforce Developers PDII Questions and answers with ValidTests

Exam PDII All Questions
Exam PDII Premium Access

View all detail and faqs for the PDII exam

Viewing page 4 out of 5 pages
Viewing questions 31-40 out of questions
Questions # 31:

A company wants to run different logic based on an Opportunity's record type.

Which code segment handles this request and follows best practices?

A)

Question # 31

B)

Question # 31

C)

Question # 31

D)

Question # 31

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Expert Solution
Questions # 32:

A company's support process dictates that any time a case is closed with a status of "Could net fix," an Engineering Review custom object record should be created and populated with information from the case, the contact, and any of the products associated with the case.

What Is the correct way to automate this using an Apex trigger?

Options:

A.

An after update trigger on Case that creates the Engineering Review record and inserts it

B.

An after upset trigger on Case that creates the Engineering Review record and inserts It .

C.

A before update trigger on Case that creates the Engineering Review record and Inserts It

D.

A before upset trigger on Case that creates the Engineering Review record and Inserts it

Expert Solution
Questions # 33:

A Salesforce org has more than 50,000 contacts. A new business process requires a calculation that aggregates data from all of these contact records. This calculation needs to run once a day after business hours.

which two steps should a developer take to accomplish this?

Choose 2 answers

Options:

A.

B.

C.

D.

Expert Solution
Questions # 34:

Universal Charities (UC) uses Salesforce to collect electronic donations in the form of credit card deductions from individuals and corporations.

When a customer service agent enters the credit card information, it must be sent

to 8 3rd-party payment processor for the donation to be processed, UC uses one

payment processor for individuals and a different one for corporations.

What should a developer use to store the payment processor settings for the

different payment processors, so that their system administrator can modify the

settings once they are deployed, if needed?

Options:

A.

Custom object

B.

Custom metadata

C.

Hierarchy custom setting

D.

List custom setting

Expert Solution
Questions # 35:

A developer is creating a Lightning web component that displays a list of records in a lightning-datatable. After saving a new record to the database, the list is not updating.

Question # 35

What should the developer change in the code above for this to

happen?

Options:

A.

Call rafrasnApex() ON this.dazta.

B.

Create a new variable to store the result and annotate it with @track.

C.

Create a variable to store the result and call refreshpex().

D.

Add the @track decorator to the data variable.

Expert Solution
Questions # 36:

A developer is creating a Lightning web component to display a calendar. The component will be used in multiple countries. In some locales, the first day of the week is a Monday, or a Saturday, or a Sunday. ‘What should the developer do to ensure the calendar displays accurately for users in every locale?

Options:

A.

Query the FirstDayofweek field from the Locale for the current user.

B.

Import the @salesforce/i18n module and use the firstdayofweek internationalization property.

C.

Use a custom metadata type to store key/value pairs.

D.

Use UserInfo.getLocale() in the component.

Expert Solution
Questions # 37:

Consider the controller code below that is called from an Aura component and

returns data wrapped in a class.

Question # 37

The developer verified that the queries return a single record each and there is error handling in the Aura component, but the component is not getting anything back when calling the controller getSemeData.

‘What is wrong?

Options:

A.

Instances of Apex classes, such as MyDatsWrapper, cannot be returned to a Lightning component.

B.

The member's Name and option should not have getter and setter.

C.

The member's Name and option should not be declared public.

D.

The member's Kame and option of the class MyDataWrapper should be annotated with @AuraEnabled also.

Expert Solution
Questions # 38:

In an organization that has multi-currency enabled, a developer Is tasked with building a Lighting component that displays the top ten Opportunities most recently accessed by the logged in user. The developer must ensure the Amount and LastModifiedDate field values are displayed according to the user's locale.

What is the most effective approach to ensure values displayed respect the user's locale settings?

Options:

A.

Use REGEX expressions to format the values retrieved via SOQL.

B.

Use a wrapper class to format the values retrieved via SOQL.

C.

Use the FOR VIEW clause in the SOQL query.

D.

Use the FORMAT () function in the SOQL query.

Expert Solution
Questions # 39:

A developer wants to write a generic Apex method that will compare the Salesforce Name field between any two object records. For example, to compare the Name field of an Account and an Opportunity; or the Name of an Account and a Contact.

Assuming the Name field exists, how should the developer do this?

Options:

A.

Cast each object into an sObject and use sObject.get to compare the Name fields,

B.

describe) function to compare the values of each Name field.

C.

Use the Salesforce Metadata API to extract the value of each object and compare the Name fields.

D.

Use a string. Replace () method to parse the contents of each Name field and then compare the results.

Expert Solution
Questions # 40:

Universal Containers (UC) has an ERP system that stores customer Information,

When an Account is created in Salesforce, the ERP system's REST endpoint for creating new customers must automatically be called with the Account information. If the call to the ERP

system falls, the Account should still be created. Accounts in the UC org are only created, one at a time, by users in the UC customer on-boarding department.

What should a developer implement to make the call to the ERP

system's REST endpoint?

Options:

A.

REST call from JavaScript

B.

Headless Quick Action

C.

Call a Queueable from a Trigger

D.

Apex Continuation

Expert Solution
Viewing page 4 out of 5 pages
Viewing questions 31-40 out of questions