Pre Black Friday Sale Special Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: v4s65

PDI Exam Dumps - Platform Developer I (SP23)

Question # 4

Which three code lines are required to create a Lightning component on a Visualforce page? Choose 3 answers

A.

$Lightning.createComponent

B.

C.

$Lightning.useComponent

D.

$Lightning.use

E.

Full Access
Question # 5

Which statement describes the execution order when trigger are associated to the same object and event?

A.

Triggers are executed in the order they are created..

B.

Trigger execution order cannot be guaranteed.

C.

Triggers are executed in the order they are modified

D.

Triggers are executed alphabetically by trigger name.

Full Access
Question # 6

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

Which Apex technique should the developer use?

A.

A for loop, with a switch statement inside

B.

A Switch statement, with a for loop inside

C.

An If/else statement, with a for loop inside

D.

A for loop, with an if/else statement inside

Full Access
Question # 7

Einstein Next Best Action Is configured at Universal Containers to display recommendations to internal users on the Account detail page.

If the recommendation is approved, a new opportunity record and task should be generated. If the recommendation is rejected, an Apex method must be executed to perform a callout to an external system.

Which three factors should a developer keep Hi mind when implementing the Apex method?

Choose 3 answers

A.

The method must use the @AuraEnabled annotation.

B.

The method must use the @Future annotation.

C.

The method must use the @invocableMethod annotation.

D.

The method must be defined as static.

E.

The method must be defined as public.

Full Access
Question # 8

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.

Full Access
Question # 9

A primaryid_c custom field exists on the candidate_c custom object. The filed 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 id 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?

A.

Create a Process Builder on the Candidate_c object to map the records.

B.

Create a before Insert trigger to correctly map the records.

C.

Update the primaryid__c field definition to mark it as an External Id

D.

Upload the CSV into a custom object related to Candidate_c.

Full Access
Question # 10

What is the result of the following code?

A.

The record will not be created and a exception will be thrown.

B.

The record will be created and a message will be in the debug log.

C.

The record will not be created and no error will be reported.

D.

The record will be created and no error will be reported.

Full Access
Question # 11

A development team wants to use a deployment script lo automatically deploy lo a sandbox during their development cycles.

Which two tools can they use to run a script that deploys to a sandbox?

Choose 2 answers

A.

VS Code

B.

SFDX CLI

C.

Change Sets

D.

Developer Console

Full Access
Question # 12

Which three Salesforce resources can be accessed from a Lightning web component?

Choose 3 answers

A.

SVG resources

B.

Third-party web components

C.

Content asset files

D.

Static resources

E.

All external libraries

Full Access
Question # 13

A developer must create a DrawList class that provides capabilities defined in the Sortable and Drawable interfaces. public interface Sortable { void sort(); } public interface Drawable { void draw(); } Which is the correct implementation?

A.

Public class DrawList implements Sortable, Implements Drawable {

public void sort() { /*implementation*/}

public void draw() { /*implementation*/}

]

B.

Public class DrawList extends Sortable, Drawable {

public void sort() { /*implementation*/}

public void draw() { /*implementation*/}

}

C.

Public class DrawList implements Sortable, Drawable {

public void sort() { /*implementation*/}

public void draw() { /*implementation*/}

}

D.

Public class DrawList extends Sortable, extends Sortable, extends Drawable {

public void sort() { /*implementation*/ }

public void draw() { /* implementation */}

Full Access
Question # 14

Universal Containers stores the availability date on each Line Item of an Order and Orders are only shipped when all of the Line Items are available. Which method should be used to calculate the estimated ship date for an Order?

A.

Use a CEILING formula on each of the Latest availability date fields.

B.

Use a DAYS formula on each of the availability date fields and a COUNT Roll-Up Summary field on the Order.

C.

Use a LATEST formula on each of the latest availability date fields.

D.

Use a Max Roll-Up Summary field on the Latest availability date fields.

Full Access
Question # 15

The Account object in an organization has a master detail relationship to a child object called Branch. The following automations exist:

• Rollup summary fields

• Custom validation rules

• Duplicate rules

A developer created a trigger on the Account object.

What two things should the developer consider while testing the trigger code?

Choose 2 answers

A.

Rollup summary fields can cause the parent record to go through Save.

B.

The trigger may fire multiple times during a transaction.

C.

Duplicate rules are executed once all DML operations commit to the database.

D.

The validation rules will cause the trigger to fire again.

Full Access
Question # 16

Ursa Major Solar has a custom object, serviceJob-o, with an optional Lookup field to Account called partner-service-Provider_c.

The TotalJobs-o field on Account tracks the total number of serviceJob-o records to which a partner service provider Account is related.

What is the most efficient way to ensure that the Total job_o field kept up to data?

A.

Change TotalJob_o to a roll-up summary field.

B.

Create a record-triggered flow on ServiceJob_o.

C.

Create an Apex trigger on ServiceJob_o.

D.

Create a schedule-triggered flow on ServiceJob_o.

Full Access
Question # 17

An Opportunity needs to have an amount rolled up from a custom object that is not in a master-detail relationship.

How can this be achieved?

A.

Write a trigger on the child object and use a red-black tree sorting to sum the amount for all related child objects under the Opportunity.

B.

Write a Process Builder that links the custom object to the Opportunity.

C.

Write a trigger on the child object and use an aggregate function to sum the amount for all related child objects under the Opportunity

D.

Use the Streaming API to create real-time roll-up summaries.

Full Access
Question # 18

A developer is migrating a Visualforce page into a Lightning web component.

The Visualforce page shows information about a single record. The developer decides to use Lightning Data Service to access record data.

Which security consideration should the developer be aware of?

A.

Lightning Data Service handles sharing rules and field-level security.

B.

Lightning Data Service ignores field-level security.

C.

The with sharing keyword must be used to enforce sharing rules.

D.

The isAccessible ( ) method must be used for field-level access checks

Full Access
Question # 19

Universal Containers has a Visualforce page that displays a table of every Container_c. being ……. Is falling with a view state limit because some of the customers rent over 10,000 containers.

What should a developer change about the Visualforce page to help with the page load errors?

A.

Use Lazy loading and a transient List variable.

B.

Use JavaScript remoting with SOQL Offset.

C.

Implement pagination with an OffsetController.

D.

Implement pagination with a StandardSetController,

Full Access
Question # 20

A developer must write anApex method that will be called from a lightning component. The method may delete an Account stored in the accountRec variable.

Which method should a developer use to ensure only users that should be able to delete Accounts can successfully perform deletion?

A.

accountRec., isDeletable()

B.

Account, isDeletable ()

C.

AccountRec, ObjecType, ieDeletable ()

D.

Schena, sobjectType, Account, isDeletetable ()

Full Access
Question # 21

A developer has identified a method in an Apex class that performs resource intensive actions in memory by iterating over the result set of a SOQL statement on the account. The method also performs a DML statement to save the changes to the datadase.

Which two techniques should the developer implement as a best practice to ensure transaction control and avoid exceeding governor limits?

Choose 2 answers

A.

Use partial DML statements to ensure only valid data is committed.

B.

Use the System,Limit classto monitor the current CPU governor limit consumption.

C.

Use the Database,Savepoint method to enforce database integrity.

D.

D. Use the Reedonly annotation to bypass the number of rows returned by a SOQL.

Full Access
Question # 22

A developer is asked to prevent anyone other than a user with Sales Manager profile from changing the Opportunity Status to Closed Lost if the lost reason is blank.

Which automation allows the developer to satisfy this requirement in the most efficient manner?

A.

A record trigger flow on the Opportunity object

B.

An Apex trigger on the Opportunity object

C.

approval process on the Opportunity object

D.

An error condition formula on a validation rule on Opportunity

Full Access
Question # 23

Which three statements are true regarding custom exceptions in Apex? (Choose three.)

A.

A custom exception class must extend the system Exception class.

B.

A custom exception class can implement one or many interfaces.

C.

A custom exception class cannot contain member variables or methods.

D.

A custom exception class name must end with “Exception”.

E.

A custom exception class can extend other classes besides the Exception class.

Full Access
Question # 24

A Salesforce Administrator is creating a record-triggered flow. When certain criteria are met, the flow must call an Apex method to execute complex validation involving several types of objects.

When creating the Apex method, which annotation should a developer use to ensure the method

Can be used within the flow?

A.

@future

B.

@RemoteAction

C.

@InvocableMethod

D.

@AuraEnaled

Full Access
Question # 25

A developer considers the following snippet of code:

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

A.

3

B.

1

C.

4

D.

2

Full Access
Question # 26

Which scenario is valid for execution by unit tests?

A.

Load data from a remote site with a callout.

B.

Set the created date of a record using a system method.

C.

Execute anonymous Apex as a different user.

D.

Generate a Visualforce PDF with geccontentAsPDF ().

Full Access
Question # 27

What are two ways for a developer to execute tests in an org?

A.

Tooling API

B.

Developer console

C.

Bulk API

D.

Matadata API

Full Access
Question # 28

In the following example, which starting context will mymethod execute it is invoked?

A.

Sharig rules will be inherited from the calling context.

B.

Sharig rules will be enforced for the running user.

C.

Sharig rules will be enforced by the instartiating class.

D.

Sharig rules will not be enforced for the running user.

Full Access
Question # 29

A developer has a Visualforce page and custom controller to save Account records. The developer wants to display any validation rule violation to the user. How can the developer make sure that validation rule violations are displayed?

A.

Add cuatom controller attributes to display the message.

B.

Include on the Visualforce page.

C.

Use a try/catch with a custom exception class.

D.

Perform the DML using the Database.upsert() method.

Full Access
Question # 30

Which two events need to happen when deploying to a production org? Choose 2 answers

A.

All triggers must have at least 1% test coverage.

B.

All Apex code must have at least 75% test coverage.

C.

All triggers must have at least 75% test coverage.

D.

All test and triggers must have at least 75% test coverage combined

Full Access
Question # 31

A developer must modify the following code snippet to prevent the number of SOQL queries issued from exceeding the platform governor limit. public class without sharing OpportunityService( public static List getOpportunityProducts(Set opportunityIds){ List oppLineItems = new List(); for(Id thisOppId : opportunityIds){ oppLineItems.addAll([Select Id FROM OpportunityLineItems WHERE OpportunityId = :thisOppId)]; } return oppLineItems; } }

The above method might be called during a trigger execution via a Lightning component. Which technique should be implemented to avoid reaching the governor limit?

A.

Use the System.Limits.getQueries() method to ensure the number of queries is less than 100.

B.

Use the System.Limits.getlimitQueries() method to ensure the number of queries is less than 100.

C.

Refector the code above to perform the SOQL query only if the Set of opportunityIds contains less 100 Ids.

D.

Refactor the code above to perform only one SOQL query, filtering by the Set of opportunityIds.

Full Access
Question # 32

A custom Visualforce controller calls the ApexPages,addMessage () method, but no messages are rendering on the page.

Which component should be added to the Visualforce page to display the message?

A.

B.

C.

D.

Full Access
Question # 33

A Salesforce Administrator used Flow Builder to create a flow named ‘’accountOnboarding’’. The flow must be used inside an Aura component.

Which tag should a developer use to display the flow in the component?

A.

Lightning-flow

B.

Aura:flow

C.

Lightning:flow

D.

Aura:flow

Full Access
Question # 34

Universal Container is building a recruiting app with an Applicant object that stores information about an individual person that represents a job. Each application may apply for more than one job.

What should a developer implement to represent that an applicant has applied for a job?

A.

Master-detail field from Applicant to Job

B.

Formula field on Applicant that references Job

C.

Junction object between Applicant and Job

D.

Lookup field from Applicant to Job

Full Access
Question # 35

Which Lightning code segment should be written to declare dependencies on a Lightning component, c:accountList, that is used in a Visualforce page?

A)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access
Question # 36

An org has an existing Flow that creates an Opportunity with an Update Records element. A developer update the Flow to also create a Contact and store the created Contact's ID on the Opportunity.

Which update should the developer make in the Flow?

A.

Add a new Get Records element.

B.

Add a new Update Records element.

C.

Add a new Quick Action element(of type Create).

D.

Add a new Create Records element.

Full Access
Question # 37

Universal Containers has 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?

A.

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

B.

Rewrite all Visualforce pages asLightning components.

C.

Set the attribute enableLightning to true in the definition.

D.

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

Full Access
Question # 38

Universal Containers recently transitioned from Classic to Lighting Experience. One of its business processes requires certain value from the opportunity object to be sent via HTTP REST callout to its external order management system based on a user-initiated action on the opportunity page. Example values are as follow

  • Name
  • Amount
  • Account

Which two methods should the developer implement to fulfill the business requirement? (Choose 2 answers)

A.

Create a Lightning component that performs the HTTP REST callout, and use a Lightning Action to expose the component on the Opportunity detail page.

B.

Create a Process Builder on the Opportunity object that executes an Apex immediate action to perform the HTTP REST callout whenever the Opportunity is updated.

C.

Create an after update trigger on the Opportunity object that calls a helper method using @Future(Callout=true) to perform the HTTP REST callout.

D.

Create a Visualforce page that performs the HTTP REST callout, and use a Visualforce quick action to expose the component on the Opportunity detail page.

Full Access
Question # 39

What are three characteristics of change set deployments?

Choose 3 answers

A.

Change sets can only be used between related organizations.

B.

Change sets can be used to transfer records.

C.

Sending a change set between two orgs requires a deployment connection.

D.

Change sets can deploy custom settings data.

E.

Deployment is done in a one-way, single transaction.

Full Access
Question # 40

Which Apex class contains methods to return the amount of resources that have been used for a particular governor, such as the number of DML statements?

A.

Exception

B.

Messaging

C.

OrgLimits

D.

Limits

Full Access
Question # 41

A custom picklist field, Food_Preference__c, exist on a custom object. The picklist contains the following options: 'Vegan','Kosher','No Preference'. The developer must ensure a value is populated every time a record is created or updated. What is the most efficient way to ensure a value is selected every time a record is saved?

A.

Set "Use the first value in the list as the default value" as True.

B.

Set a validation rule to enforce a value is selected.

C.

Mark the field as Required on the field definition.

D.

Mark the field as Required on the object's page layout.

Full Access
Question # 42

which statement is true regarding execution order when triggers are associated to the same object and event?

A.

Trigger execution order cannot be guaranteed.

B.

executed In the order they are modified.

C.

Triggers are executed alphabetically by trigger name.

D.

Triggers are executed in the order they are created.

Full Access
Question # 43

Which three steps allow a custom SVG to be included in a Lightning web component? Choose 3 answers

A.

Upload the SVG as a static resource.

B.

Import the static resource and provide a getter for it in JavaScript.

C.

Reference the getter in the HTML template.

D.

Reference the import in the HTML template.

E.

Import the SVG as a content asset file.

Full Access
Question # 44

The following automations already exist on the Account object;

• A workflow rule that updates a field when a certain criteria is met

• A custom validation on a field

• A How that updates related contact records

A developer created a trigger on the Account object.

What should the developer consider while testing the trigger code?

A.

The flow may be launched multiple times.

B.

Workflow rules will fire only after the trigger has committed all DML operations to the database.

C.

A workflow rule field update will cause the custom validation to run again.

D.

The trigger may fire multiple times during a transaction.

Full Access
Question # 45

A developer wrote an Apex method to update a list of Contacts and wants to make it available for use by Lightning web components.

Which annotation should the developer add to the Apex method to achieve this?

A)

B)

C)

D)

A.

Option

B.

Option

C.

Option

D.

Option

Full Access
Question # 46

A developer created this Apex trigger that calls MyClass,myStartmethod:

The developer creates a test method that calls MyClase,myStartmethod directly, resulting in 81% overall code coverage.

What happens wtier the developer tries to deploy the ... and two classes to production, assuming no other code exists?

A.

The deployment fails because the Apr- MgQM has no code coverage.

B.

The deployment tails because no assertions mett made in the lest method.

C.

The deployment passes became the Apex code has the requited 75% code coverage.

D.

The deployment passes because both classes and the trigger were included ki the deployment.

Full Access
Question # 47

A developer created a new trigger that inserts a Task when a new Lead is created. After deploying to production, an outside integration chat reads task records is periodically reporting errors.

Which change should the developer make to ensure the integration is not affected with minimal impact to business logic?

A.

Deactivate the trigger before the integration runs.

B.

Use a try-catch block after the insert statement.

C.

Remove the Apex class from the integration user's profile.

D.

Use the Database method with all or None set to false

Full Access
Question # 48

What are three ways for a developer to execute tests in an org? Choose 3.

A.

Bulk API

B.

Tooling API

C.

Setup Menu

D.

Salesforce DX

E.

Metadata API.

Full Access
Question # 49

A company has been adding data to Salesforce and has not done a good Job of limiting the creation of duplicate Lead records. The developer is considering writing an Apex process to identify duplicates and merge the records together.

Which two statements are valid considerations when using merged?

Choose 2 answers

A.

The field values on the master record are overwritten by the records being merged.

B.

Merge is supported with accounts, contacts, cases, and leads.

C.

External ID fields can be used with the merge method.

D.

The merge method allows up to three records, including the master and two additional records with the same sObject type, to be merged into the master record.

Full Access
Question # 50

A developer must troubleshoot to pinpoint the causes of performance issues when a custom page loads in their org. Which tool should the developer use to troubleshoot?

A.

AppExchange

B.

Salesforce CLI

C.

Visual Studio Core IDE

D.

Developer Console

Full Access