DON'T WANT TO MISS A THING?

Certification Exam Passing Tips

Latest exam news and discount info

Curated and up-to-date by our experts

Yes, send me the newsletter

Salesforce PDII Exam Sample Questions | SPOTO

SPOTO's latest exam dumps on the homepage, with a 100% pass rate! SPOTO delivers authentic Cisco CCNA, CCNP study materials, CCIE Lab solutions, PMP, CISA, CISM, AWS, and Palo Alto exam dumps. Our comprehensive study materials are meticulously aligned with the latest exam objectives. With a proven track record, we have enabled thousands of candidates worldwide to pass their IT certifications on their first attempt. Over the past 20+ years, SPOTO has successfully placed numerous IT professionals in Fortune 500 companies.
Take other online exams

Question #1
Universal Containers uses Salesforce to manage its product offerings to customers. A developer is building a custom mobile app that must allow app users to view product information, in real time, that is stored in Salesforce. What should the developer use to get the product information from Salesforce?
A. SOAP API
B. User Interface API
C. Streaming API
D. REST APT
View answer
Correct Answer: D
Question #2
Consider the following queries. For these queries, assume that there are more than 200,000 Account records. These records include soft-deleted records; that is, deleted records that are still in the Recycle Bin. Note that there are two fields that are marked as External Id on the Account. These fields are Customer_Number__c and ERP_Key__c. Which two queries are optimized for large data volumes? Choose 2 answers
A. SELECT Id FROM Account WHERE Id IN : aListVariable
B. SELECT Id FROM Account WHERE Name != ' ' AND IsDeleted = false
C. SELECT Id FROM Account WHERE Name != NULL
D. SELECT Id FROM Account WHERE Name != ' ' AND Customer Number c = 'ValueA'
View answer
Correct Answer: AD
Question #3
An org has a requirement that the Shipping Address on the Account must be validated by a third- party web service, before the Account is allowed to be inserted. What is the optimal way to meet this requirement?
A. Make a callout to the web service from a custom Visualforce controller
B. Make a callout to the web service from a standard Visualforce controller
C. Make a callout to the web service from an after insert trigger
D. Make a callout to the web service from a before insert trigger
View answer
Correct Answer: D
Question #4
A developer created a Lightning web component that uses a Lightning-record-edit-force to collect information about Leads. Users complain that they only see one error message at a time when they save a Lead record. What can the developer use to perform the validations, and allow multiple error messages to be displayed simultaneously?
A. Apex REST
B. External JavaScript Library
C. Apex Trigger
D. Process Builder
View answer
Correct Answer: B
Question #5
Universal Containers implements a private sharing model for the Convention_Attendence_c custom object. As part of a new quality assurance effort, the company created an Event___Reviewer__c user lookup field on the object. Management wants the event reviewer to automatically gain Read/write access to every record they are assigned to. What is the best approach to ensure the assigned reviewer obtains Read/Write access to the record?
A. Create an After Insert trigger on the Convention Attendee custom object, and use Apex Sharing Reasons and Apex Managed Sharing
B. Create a Before Insert trigger on the Convention Attendee custom object, and use Apex Sharing Reasons and Apex Managed Sharing
C. Create a criteria-based sharing rule on the Convention Attendee custom object to share the records the a group of Event Reviewers
D. Create criteria-based sharing rules on the Convention Attendee custom object to share the records with the Event Reviewers
View answer
Correct Answer: B
Question #6
Which two scenarios require an Apex method to be called imperatively from a Lightning web component? Choose 2 answers
A. Calling a method that makes a web service callout
B. Calling a method that is not annotated with cacheable=true
C. Calling a method with the click of a button
D. Calling a method that is external to the main controller for the Lightning web component
View answer
Correct Answer: BC
Question #7
As part of a custom development, a developer creates a Lightning component to show how a particular opportunity progresses over time. The component must display the date stamp when any of the following fields change: Amount, Probability, Stage, or Close DateHow should the developer access the data that must be displayed?
A. Execute a SOQL query for Amount, Probability, Stage, and Close Date on the OpportunityHistory object
B. Create custom a custom date field on Opportunity for each field to track the previous date and execute a SOQL query for date fields
C. Subscribe to the Opportunity Change Data Capture event in the Lightning component
D. Subscribe to the OpportunityHistory Change Data Capture event in the Lightning component
View answer
Correct Answer: B
Question #8
A developer i$ tasked Dy Unversai Containers to build out a system to track the container repair process. Containers should be tracked as they move through the repair process, starting when a customer reports an issue and ending when the container is returned to the customer. Which solution meets these business requirements while following best practices?
A. Use Flow Builder|
B. involve a Salesforce administrator and build out a declarative solution that works in Salesforce desktop and mobile
C. Build an automated Lightning Application using Application Events to ensure data integrity
D. Use Platform Events with Workflow Rules and RFID integration to ensure proper tracking of the containers
View answer
Correct Answer: A
Question #9
A developer notices the execution of all the test methods in a class takes a long time to run, due to the initial setup of all the test data that is needed to perform the tests. What should the developer do to speed up test execution?
A. Define a method that creates test data and annotate with @testSetup
B. Define a method that creates test data and annotate with @createData
C. Reduce the amount of test methods in the class
D. Ensure proper usage of test data factory In all test methods
View answer
Correct Answer: A
Question #10
A developer wrote the following method to find all the test accounts in the org:What should be used to fix this falling test?
A. Test
B. Test
C. @isTest (See AllData=true) to access org data for the test
D. @testSetup method to set up expected data
View answer
Correct Answer: B
Question #11
A developer is asked to look into an issue where a scheduled Apex is running into DML limits. Upon investigation, the developer finds that the number of records processed by the scheduled Apex has recently increased to more than 10,000. What should the developer do to eliminate the limit exception error?
A. Use the @future annotation
B. Implement the Bathable interface
C. Use platform events
D. Implement the Queueable interface
View answer
Correct Answer: B
Question #12
An Aura component has a section that displays some information about an Account and it works well on the desktop, but users have to scroll horizontally to see the description field output on their mobile devices and tablets.Which option has the changes to make the component responsive for mobile and tablet devices?
A. Option A
B. Option B
C. Option C
D. Option D
View answer
Correct Answer: C
Question #13
When should you use the "transient" property on variables?
A. Variables that you want transmitted as part of the view state
B. Variables that you don't want transmitted as part of the view state
C. Static variables that you want transmitted as part of the view state to save space
D. Large variables in order to save space
View answer
Correct Answer: B
Question #14
What are three reasons that a developer should write Jest tests for Lightning web components? Choose 3 answers
A. To test basic user interactioncorrect
B. To verify that events fire when expectedcorrect
C. To test how multiple components work together
D. To verify the DOM output of a componentcorrect
E. To test a component's non-public propertiescorrect
View answer
Correct Answer: ABDE
Question #15
Universal Containers needs to integrate with an external system. The process is initiated when a record is created in Salesforce. The remote system does not require Salesforce to wait for a response before continuing. What should the developer use to accomplish this?
A. Trigger with HTTP callout
B. PushTopic event
C. Outbound message
D. Platform event
View answer
Correct Answer: A
Question #16
A managed package uses a list of country ISO codes and country names as reference data in many different places from within the managed package Apex code. What is the optimal way to store and retrieve the list?
A. Store the information in Custom Metadata and query it with SOQL
B. Store the information in Custom Metadata and access it with the getAll() method
C. Store the information in a List Custom Setting and query it with SOQL
D. Store the information in a List Custom Setting and access it with the getAll() method
View answer
Correct Answer: D
Question #17
A developer is tasked with creating a Lightning web component that is responsive on various devices.Which two components should help accomplish this goal?Choose 2 answers
A. lightning-input-location
B. lightning-navigation
C. lightning-layout
D. lightning-layout-item
View answer
Correct Answer: CD
Question #18
Which two best practices should the developer Implement to optimize this code? Choose 2 answers
A. Use a collection for the DML statement
B. Query the Pricing_structure__c records outside of the loop
C. Change the trigger context to after update, after insert
D. Remove the DML statement
View answer
Correct Answer: ABD
Question #19
A developer Is asked to develop a new AppExthange application. A feature of the program creates Survey records when a Case reaches a certain stage and Is of a certain Record Type. This feature needs to be configurable, as different Salesforce instances require Surveys at different times. Additionally, the out-of-the-box AppExchange app needs to come with a set of best practice settings that apply to most customers. What should the developer use to store and package the custom configuration settings for the
A. Custom Settings
B. Custom Metadatacorrect
C. Custom Objects
D. Process Builder
View answer
Correct Answer: B
Question #20
A developer is tasked by Universal Containers to build out a system to track the container repair process. Containers should be tracked as they move through the repair process, starting when a customer reports an issue and ending when the container is returned to the customer.Which solution meets these business requirements while following best practices?
A. Build a mobile application using Platform Events and RFID integration to ensure proper tracking of the containers and keep the customer informed
B. Involve a Salesforce administrator and build out a declarative solution that will be easy to maintain and likely cost less than customized development
C. Build a customized Lightning Application using Application Events to ensure data integrity
D. Develop a new system with automated notification to move the containers through the repair process while notifying the customer that reported the issue
View answer
Correct Answer: D
Question #21
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?
A. External Object
B. Lookup field
C. Formula field
D. External id field
View answer
Correct Answer: A
Question #22
What should a developer use to query all Account fields for the Acme account in their sandbox?
A. SELECT FROM ACCOUNT WHERE Name = ‘Acme’ LIMIT 1
B. SELECT ALL FROM Account WHERE Name = ‘Acme’ LIMIT 1
C. SELECT FIELDS FROM Account WHERE Name = ‘Acme’ LIMIT 1
D. SELECT FIELDS (ALL) FROM Account WHERE Name = ‘Acme’ LIMIT 1correct
View answer
Correct Answer: D
Question #23
A developer has a Batch Apex process, Batch_Account_Sales, that updates the sales amount for 10,000 Accounts on a nightly basis. The Batch Apex works as designed In the sandbox. However, the developer cannot get code coverage on the Batch Apex class.The test class is below:What is causing the code coverage problem?
A. The batch process will not recognize new accounts created in the same session
B. The account creation already sets the sates amount to 0
C. The executeBatch must fail within test
D. The batch needs more than one account record created
View answer
Correct Answer: C
Question #24
A developer receives complaints that the component loads slowly.Which change can the developer implement to make the component perform faster?
A. Change the default for showContacrlnfo to "false"
B. Move the contents ofC
C. Change the type of contactlnfo to "Map"
D. Add a change event handler for showContactinfo
View answer
Correct Answer: A
Question #25
A Salesforce org has more than 50,000 contacts. A new business process requires a calculation that aggregates data from all of these contact records. This calculation needs to run once a day after business hours.Which two steps should a developer take to accomplish this?Choose 2 answers
A. Use the @future annotation on the method that performs the aggregate calculation
B. Implement the schedulable Interface In the class that contains the aggregate calculation method
C. Use the areadOnly annotation on the method that performs the aggregate calculation
D. Implement the Queuable Interface in the class that contains the aggregate calculation method
View answer
Correct Answer: BD
Question #26
Refer to the code snippet below:When a Lightning web component is rendered, a list of opportunity that match certain criteria should be retrieved from the database and displayed to the end-user. Which three considerations must the developer implement to make the fetchOpps method available within the Lightning web component?
A. The fetchOpps method must be annotated with the %InvocableMethod annotation
B. The fetchOpps method must specify the (continustion-true) attribute
C. The fetchOpps method cannot mutate the result set retrieved from the database
D. The fetchOpps method must specify the (cacheable =true) attribute
E. The fecthOpps method must be annotated with the @ AuraEnabled annotation
View answer
Correct Answer: CDE
Question #27
A developer has working business logic code, but sees the following error in the test class:You have uncommitted work pending. Please commit or rollback before calling out.What is a possible solution?
A. Rewrite the business logic and test classes with estVisible set on the callout
B. Set seeAIIData to "true" at the top of the test class, since the code does not fail in practice
C. Call support for help with the target endpoint, as it is likely an external code error
D. Use test
View answer
Correct Answer: D
Question #28
A developer created a Lightning web component for the Account record page that displays the five most recently contacted Contacts for an Account. The Apex method, getRecentContacts, returns a list of Contacts and will be wired to a property in the component.Which two lines must change in the above ode to make the Apex method able to be wired? Choose 2 answers
A. Add AuraEnanled(cacheabletrue) to the line 08
B. Remove private from line 09
C. Add @AuraEnabled (cacheabletrue) to line 03
D. Add public to line 04
View answer
Correct Answer: CD
Question #29
Users complain that a page Is very slow to respond. Upon investigation, the query below Is found to perform slowly.Select id, Name FROM Contact WHERE CustomField_c null;Which two actions can a developer take to improve performance?Choose 2 answers
A. Add a UMir dause to the query to reduce the number of records returned
B. Contact Salesforce customer support to create a custom index to include null values
C. Make the CustomFleld__c field an External ID
D. Make the field CustomReW__c required because Salesforce field Indexes do not Include nulls
View answer
Correct Answer: AD
Question #30
A developer created a Lightning web component that uses a lightning-record-edit-form t collect information about Leads. Users complain that they only see one error message at a time about their input when trying to save a Lead record. complain that they only see one error message at a time about their input when trying to save a Lead record. What is the recommended approach to perform validations on more than one field, and display multiple error messages simultaneously with minimal JavaScript intervention?
A. Try/catch/finally block
B. Apex trigger
C. Validation rules
D. External JavaScript librarycorrect
View answer
Correct Answer: D

View The Updated Salesforce Exam Questions

SPOTO Provides 100% Real Salesforce Exam Questions for You to Pass Your Salesforce Exam!

View Answers after Submission

Please submit your email and WhatsApp to get the answers of questions.

Note: Please make sure your email ID and Whatsapp are valid so that you can get the correct exam results.

Email:
Whatsapp/phone number: