Pass the Salesforce Developers PDI Questions and answers with CertsForce

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

Consider the following code snippet:

public static List obtainAllFields(Set leadIds) {

List result = new List();

for (Id leadId : leadIds) {

result.add([SELECT FIELDS(ALL) FROM Lead WHERE Id = :leadId]);

}

return result;

}

Given the multi-tenant architecture of the Salesforce platform, what is a best practice a developer should implement to ensure successful execution of the method?

Options:

A.

Avoid using variables as query filters.


B.

Avoid performing queries inside for loops.


C.

Avoid executing queries without a limit clause.


D.

Avoid returning an empty List of records.


Expert Solution
Questions # 2:

A developer wants to import 500 Opportunity records into a sandbox.

Why should the developer choose to use Data Loader instead of Data Import Wizard?

Options:

A.

Data Loader automatically relates Opportunities to Accounts.


B.

Data Loader runs from the developer's browser.


C.

Data Import Wizard does not support Opportunities.


D.

Data Import Wizard can not import all 500 records,


Expert Solution
Questions # 3:

When using Salesforce DX, what does a developer need to enable to create and manage scratch orgs?

Options:

A.

Sandbox


B.

Environment Hub


C.

Production


D.

Dev Hub


Expert Solution
Questions # 4:

A developer wants to mark each Account in a List as either Active or Inactive, based on the value in the LastModified each Account being greater than 90 days in the past.

Which Apex technique should the developer use?

Options:

A.

An if-else statement, with a for loop inside


B.

A witch statement, with a for loop inside


C.

A for loop, with an if or if/else statement inside


D.

A for loop, with a switch statement inside


Expert Solution
Questions # 5:

Provide question feedback here (optional):

Question # 5

Based on this code, what is the value of x?

Options:

A.

4


B.

1


C.

2


D.

3


Expert Solution
Questions # 6:

How many Accounts will be inserted by the following block of code?

Question # 6

Options:

A.

100


B.

0


C.

150


D.

500


Expert Solution
Questions # 7:

A developer created a custom order management app that uses an Apex class. The order is represented by an Order object and an

OrderlItem object that has a master-detail relationship to Order. During order processing, an order may be split into multiple orders.

What should a developer do to allow their code to move some existing OrderItem records to a new Order record?

Options:

A.

Add without sharing to the Apex class declaration.


B.

Change the master-detail relationship to an external lookup relationship.


C.

Create a junction object between OrderItem and Order.


D.

Select the Allow reprinting option on the master-detail relationship.


Expert Solution
Questions # 8:

Which three steps allow a custom Scalable Vector Graphic (SVG) to be included in a Lightning web component?

Choose 3 answers

Options:

A.

Import the static resource and provide a JavaScript property for it.


B.

Upload the SVG as a static resource.


C.

Reference the import in the HTML template.


D.

Import the SVG as a content asset file.


E.

Reference the property in the HTML template.


Expert Solution
Questions # 9:

Which exception type cannot be caught?

Options:

A.

custom exception


B.

LinkException


C.

NoAccessException


D.

CelloutException


Expert Solution
Questions # 10:

A developer is tasked with building a custom Lightning web component to collect Contact information.

The form will be shared among many different types of users in the org. There are security requirements that only certain fields should be edited and viewed by certain groups of users.

What should the developer use in their Lightning Web Component to support the security requirements?

Options:

A.

aura-input-failed


B.

force-input-failed


C.

ui-input-failed


D.

lightning-input-failed


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