Leads4pass > Salesforce > Salesforce Developer > PDI > PDI Online Practice Questions and Answers

PDI Online Practice Questions and Answers

Questions 4

A developer has a Apex controller for a Visualforce page that takes an ID as a URL parameter. How should the developer prevent a cross site scripting vulnerability?

A. ApexPages.currentPage() .getParameters() .get('url_param')

B. ApexPages.currentPage() .getParameters() .get('url_param') .escapeHtml4()

C. String.ValueOf(ApexPages.currentPage() .getParameters() .get('url_param'))

D. String.escapeSingleQuotes(ApexPages.currentPage() .getParameters(). get('url_param'))

Buy Now
Questions 5

Which two roll-up summary field types are required to find the average of values on detail records in a Master-Detail relationship?

A. Roll-up summary field of type COUNT

B. Roll-up summary field of type SUM

C. Roll-up summary field of type NUM

D. Roll-up summary field of type TOTAL

Buy Now
Questions 6

What would a developer do to update a picklist field on related Opportunity records when a modification to the associated Account record is detected?

A. Create a process with Process Builder.

B. Create a workflow rule with a field update.

C. Create a Lightning Component.

D. Create a Visualforce page.

Buy Now
Questions 7

Which two queries can a developer use in a visualforce controller to protect against SOQL injection Vulnerabilities? Choose 2 answers

A. String qryName = '%' + String.enforceSecurityChecks(name)+ '%'; String qryString = 'SELECT Id FROM Contact WHERE Name LIKE :qryNAme'; List queryResults = Database.query(qryString);

B. String qryName = '%' + name '%'; String qryString = 'SELECT Id FROM Contact WHERE Name LIKE :qryNAme'; List queryResults = Database.query(qryString);

C. String qryName = '%' + String.escpaeSingleQuotes(name)+ '%'; String qryString = 'SELECT Id FROM Contact WHERE Name LIKE :qryNAme'; List queryResults = Database.query(qryString);

D. String qryString = 'SELECT Id FROM Contact WHERE Name LIKE :qryNAme'; List queryResults = Database.query(qryString);

Buy Now
Questions 8

What declarative method helps ensure quality data? Choose 3 answers

A. Page layouts

B. Lookup filters

C. Exception handling

D. Workflow alerts

E. Validation rules

Buy Now
Questions 9

A Visualforce page is required for displaying and editing Case records that includes both standard and custom functionality defined in an Apex class called myControllerExtension. The Visualforce page should include which attribute(s) to correctly implement controller functionality?

A. controller="Case" and extensions="myControllerExtension"

B. extensions="myControllerExtension"

C. controller="myControllerExtension"

D. standardController="Case" and extensions="myControllerExtension"

Buy Now
Questions 10

How should a developer create a new custom exception class?

A. public class CustomException extends Exception{}

B. CustomException ex = new (CustomException)Exception();

C. public class CustomException implements Exception{}

D. (Exception)CustomException ex = new Exception();

Buy Now
Questions 11

A developer Is asked to create a Visualforce page that lists the contacts owned by the current user. This component will be embedded In a Lightning page.

Without writing unnecessary code, which controller should be used for this purpose?

A. Standard list controller

B. Standard controller

C. Lightning controller

D. Custom controller

Buy Now
Questions 12

A developer created a child Lightning web component nested inside a parent Lightning web component, parent component needs to pass a string value to the child component. In which two ways can this be accomplished? Choose 2 answers

A. The parent component can use a custom event to pass the data to the child component,

B. The parent component can use the Apex controller class to send data to the child component.

C. The parent component can invoke a method in the child component

D. The parent component can use a public property to pass the data to the child component.

Buy Now
Questions 13

A third-party vendor created an unmanaged Lightning web component. The Salesforce Administrator wishes to expose the component only on Record Page Layouts.

Which two actions should the developer take to accomplish this business objective?

Choose 2 answers

A. Specify lightningCommunity_Page as a target in the XML file.

B. Ensure isExposed is set to true on the XML file.

C. Specify lightningCommunity_Page_Layout as a target in the XML file.

D. Specify lightning_RecordPage as a target in the XML file.

Buy Now
Exam Code: PDI
Exam Name: Salesforce Certification for Platform Developer I
Last Update:
Questions: 719
10%OFF Coupon Code: SAVE10

PDF (Q&A)

$49.99

VCE

$55.99

PDF + VCE

$65.99