Pass the Salesforce Developers PDII Questions and answers with CertsForce

Viewing page 1 out of 6 pages
Viewing questions 1-10 out of questions
Questions # 1:

A company manages information about their product offerings in custom objects named Catalog and Catalog Item. Catalog Item has a master-detail field to Catalog, and each Catalog may have as many as 100,000 Catalog Items.

Both custom objects have a CurrencylsoCode text field that contains the currency

code they should use. If a Catalog's CurrencylsoCode changes, all of its Catalog

Items’ CurrencylsoCodes should be changed as well.

What should a developer use to update the CurrencylsoCodes on the Catalog Items

when the Catalog's CurrencylsoCode changes?

Options:

A.

A Database.Schedulable and Database.Batchacle class that queries the Catalog Item object and updates the Catalog Items if the Catalog CurrencylSoCode is different


B.

An after insert trigger on Catalog that updates the Catalog Items if the Catalogs CurrencylsoCode is different


C.

An after insert trigger on Catalog Item that updates the Catalog Items if the Catalog’s CurrencylsoCode is different


D.

A Database. schedulable and Dazabase.Bazchacle class that queries the Catalog object and updates the Catalog Items if the Catalog CurrencylSoCode is different


Expert Solution
Questions # 2:

The Salesforce admin et Cloud Kicks created a custom object called Region_c to store all postal zip codes in the United States and the Cloud Kicks sales region the zip code belongs to.

Question # 2

Cloud Kicks wants a trigger on the Lead to populate the Region based on the Lead's zip code.

Which code segment is the most efficient way to fulfill this request?

A)

Question # 2

B)

Question # 2

C)

Question # 2

D)

Question # 2

Options:

A.

Option A


B.

Option B


C.

Option C


D.

Option D


Expert Solution
Questions # 3:

The head of recruiting at Universal Containers (UC) 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 friend, apply for a position, and review the status of their current submissions.

The app will be surfaced to UC's existing iOS and Android users via the standard mobile app that Salesforce provides. It has a custom user interface design and offline access is not required.

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

Options:

A.

Lightning Experience Builder


B.

Salesforce SDK


C.

Lightning Web Components


D.

Visualforce


Expert Solution
Questions # 4:

A developer is inserting, updating, and deleting multiple lists of records in a single transaction and wants to ensure that any error prevents all execution.

How should the developer implement error exception handling in their code to handle this?

Options:

A.

Use Database methods to obtain lists of Database.SaveResults.


B.

Use a try-catch statement and handle DML cleanup in the catch statement,


C.

Use Database.setSavepoint {} and Database.rollBack with a try-catch statement.


D.

Use a try-catch and use sObject.addError() on any failures.


Expert Solution
Questions # 5:

A Visualforce page needs to make a callout to get billing information and tax information from two different REST endpoints. The information needs to be

displayed to the user at the same time and the return value of the billing information contains the input for the tax information callout. Each endpoint might take up to two minutes to process.

How should a developer implement the callouts?

Options:

A.

An HTTP REST callout for the billing callout and a Continuation for the tax callout


B.

A Continuation for both the billing callout and the tax callout


C.

An HTTP REST callout for both the billing callout and the tax callout


D.

A Continuation for the billing callout and an HTTP REST callout for the tax callout


Expert Solution
Questions # 6:

Refer to the test method below''

Question # 6

The test method calls a web service that updates an external system with Account

information and sets the Accounts integration_Updated__c checkbox to True when it completes.

The test fails to execute and exits with an error: "Methods defined as TestMethod do

not support Web service callouts.”

A)

Question # 6

B)

Question # 6

C)

Question # 6

D)

Question # 6

Options:

A.

Option A


B.

Option B


C.

Option C


D.

Option D


Expert Solution
Questions # 7:

Business rules require a Contact ta always be created when a new Account is created.

What can be used when developing a custom screen to ensure an Account is not created if the creation of the Contact fails?

Options:

A.

Use setSaverpoint (1) and rollback() with a try-catch block.


B.

Use the Database. Insect method with a11orNone SEL LO alee,


C.

Use the Database. Delete method if the Contact insertion fails.


D.

Disable validation rules on Contacts and set default values with a trigger.


Expert Solution
Questions # 8:

Given the following code:

Question # 8

Assuming there were 10 Contacts and five Accounts created today, what is the expected result?

Options:

A.

System.QueryException: Too many DML Statement errors on Contact


B.

System.QueryException: List has more than one row for Assignment on Account


C.

Systemn.LimitException: Too many SOQL Queries on Account


D.

System.LimitException: Too many SOQL Queries on Contact


Expert Solution
Questions # 9:

Consider the following code snippet:

Question # 9

The Apex method is executed in an environment with a large data volume count for Accounts, and the query is performing poorly.

Which technique should the developer implement to ensure the query performs optimally, while preserving the entire result set?

Options:

A.

Create a formula field to combine the createdDate and RecordType value, then filter based on the formula.


B.

Break down the query into two individual queries and join the two result sets.


C.

Annotate the method with the @Future annotation


D.

Use the Database queryLocator method to retrieve the accounts.


Expert Solution
Questions # 10:

When the code is executed, the callout is unsuccessful and the following error appears within the Developer Console:

System.CalloutException: Unauthorized endpoint

Which recommended approach should the developer implement

to resolve the callout exception?

Options:

A.

Annotate the getkRFCatalogContents method with @Future (Callout-true),


B.

Change the access modifier for ERPCatalog from public to global.


C.

Use the SetHeader() method to specify Basic Authentication,


D.

Create a remote site setting configuration that includes the endpoint.


Expert Solution
Viewing page 1 out of 6 pages
Viewing questions 1-10 out of questions