Pass the Salesforce Developers PDII Questions and answers with CertsForce

Viewing page 5 out of 6 pages
Viewing questions 41-50 out of questions
Questions # 41:

Universal Containers wants to use a Customer Community with Customer Community Plus licenses to allow their customers access to track how many containers they have rented and when they are due back. Universal Containers uses a Private sharing model for External users, Many of their customers are multi-national corporations with complex Account hierarchies. Each account on the hierarchy represents a department within the same business,

One of the requirements is to allow certain community users within the same

Account hierarchy to see several departments’ containers, based on a custom

junction object that relates the Contact to the various Account records that

represent the departments.

Which solution solves these requirements?

Options:

A.

A Visualforce page that uses a custom controller that specifies without sharing [0 expose the records


B.

An Apex trigger that creates Apex managed sharing records based on the junction object's relationships


C.

A Lightning web component on the Community Home Page that uses Lightning Data Services.


D.

A custom list view on the junction object with filters that will show the proper records based on owner


Expert Solution
Questions # 42:

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

Options:

A.

Import the static resource.


B.

Reference the static resource in a <script> tag.


C.

Call loadScript.


D.

Import a method from the platformResourceLoader.


E.

Append the static resource to the DOM.


Expert Solution
Questions # 43:

How should a developer verify that a specific Account record is being tested in a test

class for a Visualforce controller?

Options:

A.

Insert the Account in the test class, instantiate the page reference in the test class, then use System.currentFageReference() .getFarameters() .put{) to set the Account ID.


B.

Insert the Account into Salesforce, instantiate the page reference in the test class, then use system. setFarentRecordId() .get() to set the Account ID.

{of Instantiate the page reference in the test class, insert the Account in

the test class, then use =seeAllData=trus to view the Account.


C.

Instantiate the page reference in the test class, insert the Account in

the test class, then use system.setFarentRecordrd() .get() to set the Account ID,


Expert Solution
Questions # 44:

A developer has a requirement to query three fields (Id, Name, Type) from an Account; and first and last names for all Contacts associated with the Account.

Which option is the preferred, optimized method to achieve this for the Account named ‘Ozone Electronics’?

A)

Question # 44

B)

Question # 44

C)

Question # 44

D)

Question # 44

Options:

A.

Option A


B.

Option B


C.

Option C


D.

Option D


Expert Solution
Questions # 45:

A developer wrote a class named asccuntRisteryManager that relies on field history tracking. The class has a static method called getaccountHistory that Lakes in an Account as a parameter and returns a list of associated accountHistory object records.

The following test fails:

Question # 45

What should be done to make this test pass?

Options:

A.

Create Accountdistory records manually in the test setup and write a query to get them.


B.

Use @isTest (SeeAllData=true] to see historical data from the org and query for Accountdistory records.


C.

Use Test. isRunningTest (] in getAccountHistory() to conditionally return fake AccountHistory records.


D.

The tact method should he delated since this code cannat be tested


Expert Solution
Questions # 46:

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 # 47:

Consider the following code snippet:

Question # 47

Which two steps should the developer take to add flexibility to change the endpoint and credentials without needing to modify code?

Choose 2 answers

Options:

A.

Use req. setindpoint ('callout:endFoint_NC'); within the callout request.


B.

Store the URL of the endpoint in a custom Label named endpointuRL.


C.

Create a Named Credential, endPcint_wc, ta store the endpoint and credentials.


D.

Use red. setEndpoint (Label.endPointURL) ;.


Expert Solution
Questions # 48:

A developer is asked to find a way to store sacret data with an ability to specify which profiles and users can access which secrets.

What should be used to store this data?

Options:

A.

system.Cookie class


B.

Custom settings


C.

Static resources


D.

Custom metadata


Expert Solution
Questions # 49:

Part of a custom Lightning component displays the total number of Opportunities in the org, which are in the millions. The Lightning

component uses an Apex method to get the data it needs.

What is the optimal way for a developer to get the total number of Opportunities for the Lightning component?

Options:

A.

SOQL for loop that counts the number of Opportunities records


B.

Apex batch job that counts the number of Opportunity records


C.

SUM () SOQL aggregate query on the Opportunity object


D.

COUNT () SOQL aggregate query on the Opportunity object


Expert Solution
Questions # 50:

Which two queries are selective SOQL queries and can be used for a large data set of 200,000 Account records?

Choose 2 answers

Options:

A.

SELECT Id FROM Account WHERE Name LIKE '!-NULL


B.

SELECT Id FRCM Account WHERE Name != ’ ’


C.

SELECT Id FRCM Account WHEP Name IN (List of Names) AND Customer_Number_c= 'ValueA


D.

SELECT Id FROM Account WHERE II IK (List of Account Ida)


Expert Solution
Viewing page 5 out of 6 pages
Viewing questions 41-50 out of questions