Pass the Salesforce Developers PDI Questions and answers with CertsForce

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

Universal Containers has a large number of custom applications that were built using a third-party JavaScript framework and exposed using Visualforce pages. The company wants to update these applications to apply styling that resembles the look and feel of Lightning Experience.

What should the developer do to fulfill the business request in the quickest and most effective manner?

Options:

A.

Rewrite all Visualforce pages as Lightning components.


B.

Set the attribute enableLightning to true in the definition.


C.

Enable Available for Lightning Experience, Lightning Communities, and the mobile app on Visualforce pages used by the custom application.


D.

Incorporate the Salesforce Lightning Design System CSS stylesheet Into the JavaScript applications.


Expert Solution
Questions # 32:

A developer needs to prevent the creation of Request__c records when certain conditions exist in the system. A RequestLogic class exists that checks the conditions.

What is the correct implementation?

Options:

A.

apex

CopyEdit

trigger RequestTrigger on Request__c (before insert) {

RequestLogic.validateRecords(Trigger.new);

}


B.

apex

CopyEdit

trigger RequestTrigger on Request__c (before insert) {

RequestLogic.validateRecords(trigger.new);

}


C.

apex

CopyEdit

trigger RequestTrigger on Request__c (before insert) {

if (RequestLogic.isValid(Request__c)) {

Request.addError('Your request cannot be created at this time.');

}

}


D.

apex

CopyEdit

trigger RequestTrigger on Request__c (after insert) {

if (RequestLogic.isValid(Request__c)) {

Request.addError('Your request cannot be created at this time.');

}

}


Expert Solution
Questions # 33:

A developer has an integer variable called maxAttempts. The developer needs to ensure that once maxAttempts is initialized, it preserves its value for the length of the Apex transaction; while being able to share the variable's state between trigger executions.

How should the developer declare maxAttempts to meet these requirements?

Options:

A.

Declare maxattempts as a constant using the static and final keywords.


B.

Declare maxattempts as a member variable on the trigger definition.


C.

Declare maxattempts as a variable on a helper class.


D.

Declare maxAttempts as a private static variable on a helper class.


Expert Solution
Questions # 34:

The orderHelper class is a utility class that contains business logic for processing orders. Consider the following code snippet:

Public class without sharing orderHelper {// code implementation

}

A developer needs to create a constant named delivery_multiplier with a value of 4.15. The value of the constant should not change at any time in the code.

How should the developer declare the delivery multiplier constant to meet the business objectives?

Options:

A.

static decimal DELIVERY_MULTIPLIER = 4.15;


B.

constant decimal DELIVERY_MULTIPLIER = 4.15;


C.

static final decimal DELIVERY_MULTIPLIER = 4.15;


D.

decimal DELIVERY_MULTIPLIER = 4.15;


Expert Solution
Questions # 35:

A developer creates a Lightning web component that imports a method within an Apex class. When a Validate button is pressed, the method runs to execute complex validations.

In this implementation scenario, which two options are.. of the Controller according to the MVC architecture?

Choose 2 answers

Options:

A.

HTML file


B.

Apex class


C.

JavaScript file


D.

XML file


Expert Solution
Questions # 36:

What should a developer use to obtain the Id and Name of all the Leads, Accounts, and Contacts that have the company name "Universal Containers?

Options:

A.

FIND ‘Universal Conteiners' IN CompenyName Fields RETURNING leadjid, name), sccount(ad, name}, conteact(id, name)


B.

SELECT Lead.id, Lead.Neme, Account,Id, Account.Neme, Contact.id, Contact.Neame FROM Lead, Account, Contact WHERE CompanyName = "Universal Containers*


C.

PIND ‘Universal Centainers’ IN Name Fields RETURNING lead(id, name), saceount(id, mame), contact (id, name)


D.

SELECT lead(id, name), account (id, name}, contact(id, name) FROM Lead, Account, Contact WHERE Name = "Universal Containers’


Expert Solution
Questions # 37:

Universal Containers wants Opportunities to no longer be editable when reaching the Closed/Won stage.

How should a developer accomplish this?

Options:

A.

Use a validation rule.


B.

Make fields as read-only on the page layout.


C.

Use the Process Automation settings.


D.

Use Flow Builder.


Expert Solution
Questions # 38:

A developer identifies the following triggers on the Expense _c object:

Question # 38

The triggers process before delete, before insert, and before update events respectively.

Which two techniques should the developer implement to ensure trigger best practices are followed?

Choose 2 answers

Options:

A.

Unity all three triggers In a single trigger on the Expense__c object that Includes all events.


B.

Unify the before insert and before update triggers and use Flow for the delete action.


C.

Create helper classes to execute the appropriate logic when a record is saved.


D.

Maintain all three triggers on the Expense __c object, but move the Apex logic out of the trigger definition.


Expert Solution
Questions # 39:

A developer is integrating with a legacy on-premise SQL database.

What should the developer use to ensure the data being integrated is matched to the right records in Salesforce?

Options:

A.

External Object


B.

External ID field


C.

Formula field


D.

Lookup field


Expert Solution
Questions # 40:

A Primaryld_c custom field exists on the Candidate _c¢ custom object. The field is used to store each candidate's id number and is marked as Unique in the schema definition.

As part of a data enrichment process, Universal Containers has a CSV file that contains updated data for all candidates in the system. The file contains each Candidate's primary .. as a data point. Universal Containers wants to upload this information into Salesforce, while ensuring all data rows are correctly mapped to a candidate in the system.

Which technique should the developer implement to streamline the data upload?

Options:

A.

Upload the CSV into-a custom object related to candidate__c.


B.

Create a before insert trigger to correctly map the records,


C.

Update the Primarytd_c field definition to mark it. as.an External Id.


D.

Create a before save flow to correctly map the records.


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