Pass the Salesforce Developers PDII Questions and answers with CertsForce

Viewing page 2 out of 6 pages
Viewing questions 11-20 out of questions
Questions # 11:

A developer is building a complex commission calculation engine in Apex that is called from an Opportunity trigger. During QA it was reported that the calculations are incorrect.

The developer has representative test data and passing test methods in their developer sandbox.

Which three tools or techniques could the developer use to execute the code and pause it at key lines to visually inspect values of various Apex variables?

Choose 3 answers

Options:

A.

Apex Interactive Debugger


B.

Workbench


C.

Developer Console


D.

Breakpoints


E.

Apex Replay Debugger


Expert Solution
Questions # 12:

Question # 12

Consider the above trigger intended to assign the Account to the manager of the Account's region,

Which two changes should a developer make in this trigger to adhere to best practices?

Options:

A.

Use a Map to cache the results of the Region._c query by Id.


B.

Move the Region__c query to outside the loop.


C.

Use a Map accountMap instead of List accountList.


D.

Remove the last line updating accountList as It Is not needed.


Expert Solution
Questions # 13:

A developer is working with existing functionality that tracks how many times a stage has changed for an Opportunity. When the Opportunity’s stage is changed, a workflow rule is fired to increase the value of a field by one. The developer wrote an after trigger to create a child record when the field changes from 4 to 5.

A user changes the stage of an Opportunity and manually sets the count field to 4. The count field updates to 5, but the child record is not created.

What is the reason this is happening?

Options:

A.

Trigger.old does not contain the updated value of the count field.


B.

After triggers fire before workflow rules.


C.

Trigger.new does not change after a field update.


D.

After triggers are not fired after field updates.


Expert Solution
Questions # 14:

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 # 14

B)

Question # 14

C)

Question # 14

D)

Question # 14

Options:

A.

Option A


B.

Option B


C.

Option C


D.

Option D


Expert Solution
Questions # 15:

A company wants to incorporate a third-party weh service to set the Address fields

when an Account is inserted, if they have not already been set.

What is the optimal way to achieve this?

Options:

A.

Create a Workflow Rule, execute a Queueable job from it, and make a callout from the Queueable job.


B.

Create an Apex trigger, execute a Queueable job from it, and make a callout from the Queueable job.


C.

Create a Process, execute a Quaueable job from it, and make a callout from the Queueable job.


D.

Create a Before Save Flow, execute a Queueable job from it, and make a callout from the Queusable job.


Expert Solution
Questions # 16:

For compliance purposes, a company is required to track long-term product usage in their org. The information that they need to log will be collected from more than one object and, over time, they predict they will have hundreds of millions of records.

What should a developer use to implement this?

Options:

A.

Setup audit trail


B.

Field audit trail


C.

Big objects


D.

Field history tracking


Expert Solution
Questions # 17:

A company has reference data stored in multiple custom metadata records that represent default information and delete behavior for certain geographic regions.

When a contact is inserted, the default information should be set on the contact from the custom metadata records based on the contact's address information.

Additionally, if a user attempts to delete a contact that belongs to a flagged region, the user must get an error message.

Depending on company personnel resources, what are two ways to automate this?

Choose 2 answers

Options:

A.

Remote action


B.

Flow Builder


C.

Apex trigger


D.

Apex invocable method


Expert Solution
Questions # 18:

After a platform event is defined in a Salesforce org,events can be published via which mechanism?

Options:

A.

External Apps use an API Co publish event messages.


B.

Internal Apps can use entitlement processes.


C.

External Apps require the standard Streaming API.


D.

Internal Apps can use outbound messages.


Expert Solution
Questions # 19:

A developer is writing a Visualforce page that queries accounts in the system and presents a data table with the results. The users want to be able to filter the results based on up to five fields. However, the users want to pick the five fields to use as filter fields when they run the page.

Which Apex code feature is required to facilitate this solution?

Options:

A.

Streaming API


B.

Metadata APT


C.

variable binding


D.

dynamic SOQL


Expert Solution
Questions # 20:

Refer to the Lightning component below:

Question # 20

The Lightning Component allows users to click a button to save their changes and then redirects them to a different page.

Currently when the user hits the Save button, the records are getting saved, but they are not redirected.

Which three techniques can a developer use to debug the JavaScript?

Choose 3 answers

Options:

A.

Use console.log () messages in the JavaScript.


B.

Use the browser's dev tools to debug the JavaScript.


C.

Enable Debug Mode for Lightning components for the user.


D.

Use Developer Console to view checkpoints.


E.

Use Developer Console to view the debug log.


Expert Solution
Viewing page 2 out of 6 pages
Viewing questions 11-20 out of questions