Valid PDII Dumps shared by ExamDiscuss.com for Helping Passing PDII Exam! ExamDiscuss.com now offer the newest PDII exam dumps, the ExamDiscuss.com PDII exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com PDII dumps with Test Engine here:

Access PDII Dumps Premium Version
(204 Q&As Dumps, 35%OFF Special Discount Code: freecram)

Online Access Free PDII Exam Questions

Exam Code:PDII
Exam Name:Salesforce Certified Platform Developer II (PDII)
Certification Provider:Salesforce
Free Question Number:154
Version:v2023-02-10
Rating:
# of views:5638
# of Questions views:280911
Go To PDII Questions

Recent Comments (The most recent comments are at the top.)

HG - Jul 01, 2025

No.# It's "Queries" not "Records" bro

Igris - Jun 28, 2025

No.# Correct answer is A.
Execute a SOQL query for Amount, Probability, Stage, and Close Date on the OpportunityHistory object.

OpportunityHistory is a standard Salesforce object that automatically tracks changes to key fields like Amount, Stage, Probability, and Close Date.
You can query it directly to retrieve historical change records with timestamps, perfect for displaying field change timelines.

Igris - Jun 26, 2025

No.# Correct Answer Should be >>
Import the @salesforce/i18n module and use the firstDayOfWeek internationalization property.

This option is not mention for above question.

Explanation:
UserInfo.getLocale() – Returns locale like "en_US" but not the first day of the week. You’d still need to map it yourself manually, which is unnecessary.

https://salesforce.stackexchange.com/questions/292069/how-to-find-first-day-of-the-week-by-locale?
https://developer.salesforce.com/docs/platform/lwc/guide/create-i18n.html

Igris - May 17, 2025

No.# Ans is b Use "FOR UPDATE" in a soql query

Account acc = [SELECT Id, Is_Registered__c FROM Account WHERE Id = :accountId FOR UPDATE];
if (!acc.Is_Registered__c) {
acc.Is_Registered__c = true;
// ...set other fields...
update acc;
}

Using 'FOR UPDATE' in your SOQL query will place a row-level lock on the queried Account record. This ensures that:
No other transaction can modify that record until your transaction completes.
It prevents race conditions where two users could read the same unregistered Account and both proceed to update it simultaneously.


Database.update(account, false) --> false suppresses errors for partial updates but does not prevent record collision or overwrites.
Add a try/catch block --> Useful for handling errors after they occur, but does not prevent concurrent modification.
Use upsert instead of update --> upsert is used to insert or update based on record existence — not useful for handling concurrent updates to existing records.

Igris - May 10, 2025

No.# The correct answer is: C. Use @Cache annotation

✅ Explanation:
When the requirement is to show the cached results that were first accessed, even if the data is updated elsewhere, you're essentially looking to retain and serve stale data temporarily to maintain consistency during user navigation. Let's break down each option:

🔹 A. Use OFFSET in SOQL queries
What it does: OFFSET is used to skip a number of rows in a SOQL query, useful for pagination.

Limitation: It doesn’t cache data—every query hits the database and gets fresh results, which violates the requirement of showing cached data.

✅ Good for pagination, ❌ bad for caching.

🔹 B. Use OFFSET WITH CACHE in SOQL queries
Fact: This is not a valid SOQL syntax.

There’s no such thing as OFFSET WITH CACHE in Salesforce SOQL.

❌ Invalid option.

🔹 C. Use @Cache annotation
Usage: The @AuraEnabled(cacheable=true) annotation (for Lightning Web Components or Aura) caches the Apex method result on the client-side.

Once data is fetched, the same result is served from the cache when the method is re-invoked unless explicitly refreshed.

✅ Best fit for requirement: Ensures that even if backend data changes, users still see the same cached data during pagination or navigation.

🔹 D. Use a StandardSetController
Usage: Useful for standard pagination with VF pages.

It retrieves live data on each query.

It doesn’t cache results, so if data changes in the backend, the user sees new data, not what was originally accessed.

❌ Not aligned with the caching requirement.

✅ Final Answer: C. Use @Cache annotation
Would you like a sample Apex method and LWC example that demonstrates this behavior?...

Eli - May 04, 2025

I passed my PDII exam at first try.

Jo - Jan 25, 2025

No.# Correct but the correct syntaxe must be : import updateAccounts from "@salesforce/apex/namespace.AccountController.updateAccounts";

Lillian - Jan 04, 2025

PDII file is 100% valid!!Took test today and passed. PDII exam is difficult.

Abhisek - Jul 04, 2024

No.# Option A
import firstDayOfWeek from '@salesforce/i18n/firstDayOfWeek';
https://developer.salesforce.com/docs/platform/lwc/guide/create-i18n.html

Roy - Apr 06, 2024

It's so interesting to learn the PDII exam. Thanks to those who achieve a better success who just encouraged me to get prepared and pass the PDII exam!

Davide - Sep 30, 2023

No.# Should be "C".

SFUser - Sep 29, 2023

No.# A B E is correct
https://www.infallibletechie.com/2016/08/convertcurrency-in-salesforce.html#:~:text=Use%20convertCurrency()%20in%20a,organization%20is%20multi%2Dcurrency%20enabled.&text=Use%20convertCurrency()%20in%20the,fields%20to%20the%20user's%20currency.

LEAVE A REPLY

Your email address will not be published. Required fields are marked *

Other Version
8485 viewsSalesforce.PDII.v2024-03-02.q90
3328 viewsSalesforce.PDII.v2024-02-22.q73
4882 viewsSalesforce.PDII.v2023-09-09.q84
2705 viewsSalesforce.PDII.v2023-08-14.q106
7122 viewsSalesforce.PDII.v2022-08-07.q138
3740 viewsSalesforce.PDII.v2022-07-07.q131
2672 viewsSalesforce.PDII.v2022-06-21.q138
3823 viewsSalesforce.PDII.v2022-03-29.q116
3926 viewsSalesforce.PDII.v2022-01-18.q113
3708 viewsSalesforce.PDII.v2021-11-18.q112
2459 viewsSalesforce.PDII.v2021-11-15.q113
3944 viewsSalesforce.PDII.v2021-07-16.q108
3643 viewsSalesforce.PDII.v2021-05-13.q99
4446 viewsSalesforce.PDII.v2020-10-27.q45
4481 viewsSalesforce.PDII.v2020-06-24.q45
Exam Question List
Question 1: A developer Is tasked with ensuring that email addresses ent...
Question 2: How would you test a web service?...
2 commentQuestion 3: Invokable methods accept sObjects as parameters....
4 commentQuestion 4: A developer created an Apex class that updates an Account ba...
Question 5: Users report that a button on a custom Lightning Web Compone...
Question 6: What is the transaction limit on the number of "sendEmail" m...
4 commentQuestion 7: A developer created the following test method: (Exhibit) The...
Question 8: A developer wants to write a generic Apex method that will c...
1 commentQuestion 9: Within the System.Limit class, what would you call to get th...
Question 10: Given a list of Opportunity records named opportunityList, w...
Question 11: A company exposes a REST web service and wants to establish ...
1 commentQuestion 12: A developer must create a custom pagination solution. While ...
2 commentQuestion 13: Consider the following code snippet: (Exhibit) The Apex meth...
Question 14: A company wants to build a custom Lightning Component that w...
Question 15: Consider the following code snippet: How should <c-order&...
Question 16: What is the correct syntax for calling a controller action f...
Question 17: A large company uses Salesforce across several departments. ...
4 commentQuestion 18: After a Platform Event Is defined in a Salesforce org, event...
Question 19: How should a developer assert that a trigger with an asynchr...
Question 20: When the sales team views an individual customer record, the...
4 commentQuestion 21: A developer wrote an Apex method to update a list of Contact...
Question 22: What is a consideration when using bind variables with dynam...
Question 23: The REST API___________.
1 commentQuestion 24: A developer has a page with two extensions overriding the St...
1 commentQuestion 25: A developer is writing a complex application involving trigg...
1 commentQuestion 26: Universal Containers wants to use a Customer Community with ...
Question 27: Consider the following code snippet, depicting an Azure comp...
Question 28: Which statement is considered a best practice for writing bu...
Question 29: Assuming the CreateOneAccount class creates one account and ...
3 commentQuestion 30: A developer is asked to build a solution that will automatic...
2 commentQuestion 31: A developer has created a solution using the SOAP API for au...
Question 32: What level can a hierarchy custom setting be defined for? (C...
1 commentQuestion 33: Refer to the code snippet below: (Exhibit) As part of an Int...
Question 34: How long is field history retained?...
Question 35: What is a benefit of using a WSDL with Apex?...
1 commentQuestion 36: A company requires an external system to be notified wheneve...
Question 37: The "action" attribute on <apex:page> is ONLY evaluate...
1 commentQuestion 38: Consider the above trigger intended to assign the Account to...
Question 39: The following code segment is railed from a Trigger handler ...
Question 40: A company's support process dictates that any time a Case is...
Question 41: A developer receives complaints that the component loads slo...
Question 42: What is the optimal technique a developer should use to prog...
1 commentQuestion 43: Example 1: AggregateResult[] groupedResults = [SELECT Campai...
Question 44: What Salesforce tool lets you deploy/retrieve metadata, chec...
1 commentQuestion 45: A Salesforce org has more than 50,000 contacts. A new busine...
Question 46: A developer has a Visual force page that automatically assig...
Question 47: The use of the transient keyword In Visualforce Page Control...
Question 48: Which tag should a developer use to display different text w...
Question 49: Which three approaches should a developer Implement to obtai...
Question 50: A developer needs test data for Apex test classes. What can ...
Question 51: A developer has generated Apex code from a WSDL for an exter...
1 commentQuestion 52: A developer is working with existing functionality that trac...
Question 53: Universal Containers uses a custom Lightning page to provide...
2 commentQuestion 54: Customer billing data must be added and updated into Salesfo...
2 commentQuestion 55: An environment has two Apex Triggers: an after-update trigge...
3 commentQuestion 56: What tool in the Developer Console contains information on S...
2 commentQuestion 57: As part of a custom development, a developer creates a Light...
Question 58: A developer is asked to find a way to store secret data with...
Question 59: A developer wrote a test class that successfully asserts a t...
Question 60: 0f Universal Containers uses Big Objects to store almost a b...
Question 61: In an organization that has multi-currency enabled, a develo...
Question 62: What is the transaction limit for the number of records usin...
Question 63: Universal Containers has a Visualforce page that displays a ...
Question 64: When calling a RESTful web service, a developer receives a J...
1 commentQuestion 65: Which code statement includes an Apex method named updateAcc...
Question 66: A developer is creating a Lightning web component that conta...
Question 67: A company wants to incorporate a third-party web service to ...
Question 68: A developer created three Rollup Summary fields: Total_times...
Question 69: A company has a custom object. Request__c. that has a field,...
Question 70: The Metadata API___________.
Question 71: Which API can b|e used to execute unit tests? (Choose three....
1 commentQuestion 72: In which of the following scenarios would it be acceptable t...
Question 73: A developer created a Lightning web component for the Accoun...
2 commentQuestion 74: How many Territories can an instance of salesforce have?...
Question 75: What is the transaction limit for the number of records for ...
Question 76: users complain that a page Is very slow to respond. Upon inv...
Question 77: A Developer wishes to improve runtime performance of Apex ca...
2 commentQuestion 78: A developer implemented a custom data table in a Lightning w...
Question 79: A company has the Lightning Component above that allows user...
Question 80: A developer wishes to improve runtime performance of Apex ca...
Question 81: What is the transaction limit on the max timeout for all cal...
Question 82: For compliance purposes, a company is required to track long...
Question 83: A developer must create a way for external partners to submi...
Question 84: What is the best way to display field-level error messages i...
Question 85: Universal Containers wants to use an external Web Service pr...
Question 86: Consider the following code snippet: (Exhibit) Choose 2 answ...
Question 87: A developer is asked to look into an issue where a scheduled...
Question 88: A developer is using a third-party JavaScript library to cre...
Question 89: Universal Containers (UC) wants to develop a customer commun...
Question 90: What is a recommended practice with regard to the Apex CPU l...
Question 91: A developer created and tested a Visualforce page in their d...
1 commentQuestion 92: Exhibit. (Exhibit) A developer created a JavaScript function...
1 commentQuestion 93: Which statement is true about using ConnectApi namespace (al...
Question 94: Universal Containers requested the addition of a third-party...
3 commentQuestion 95: ABC Company has an Apex process that makes multiple extensiv...
Question 96: Which annotation should a developer use on an Apex method to...
1 commentQuestion 97: A developer has a Debug method within a class, which is invo...
Question 98: This sales team needs a custom Visualforce page to enter sal...
1 commentQuestion 99: When developing a Visualforce page that will be used by a gl...
Question 100: A developer needs to create a Lightning page for entering Or...
Question 101: Which of the following about Dynamic Apex is incorrect?...
Question 102: A developer created a JavaScript library that simplifies the...
Question 103: A custom field Exec_Count_c of type Number is created on an ...
Question 104: Given the following containment hierarchy: (Exhibit) What is...
2 commentQuestion 105: What is the transaction limit on the number of callouts?...
Question 106: Which two scenarios require an Apex method to be called impe...
2 commentQuestion 107: What is a potential design issue with the following code? (E...
Question 108: UC Loans is a small company with a part time Salesforce admi...
Question 109: What is the transaction limit for the number of records for ...
1 commentQuestion 110: Line 1 public class AttributeTypes Line 2 { Line 3 private f...
Question 111: What are the ways a developer can create test data of Contac...
Question 112: A developer receives a LimitException: Too many query rows: ...
Question 113: A developer receives an error when trying to call a global s...
Question 114: When calling a RESTful web service, the developer must imple...
1 commentQuestion 115: A developer creates a Lightning web component to allow a Con...
1 commentQuestion 116: A developer must perform a complex SOQL query that joins two...
2 commentQuestion 117: A developer is creating a Lightning web component to display...
2 commentQuestion 118: A developer writes the following Apex trigger so that when a...
3 commentQuestion 119: Sometimes events on Salesforce need to be handled by an exte...
Question 120: Which interface needs to be implemented by a Lightning Compo...
Question 121: Which is a valid Apex REST Annotation? (Choose two.)...
1 commentQuestion 122: What is a valid request for the following REST method? (Choo...
2 commentQuestion 123: What is a consideration when testing batch Apex? (Choose two...
Question 124: A developer has written the following method: static void pr...
Question 125: Global with sharing class MyRemoter { public String accountN...
2 commentQuestion 126: What is the transaction limit for the number of SOSL queries...
Question 127: A developer wrote a Visualforce page for Sales Reps to add p...
Question 128: Which two relationship queries use the proper syntax? Choose...
Question 129: Which use case can only be performed by using asynchronous A...
Question 130: An org has a custom object, Registeration_c that has a looku...
Question 131: Which three Visualforce components can be used to initiate A...
5 commentQuestion 132: As part of a custom development, a developer creates a Light...
Question 133: A developer created an Apex class that makes outbound RESTfu...
Question 134: What is a best practice when unit testing a controller? (Cho...
Question 135: Which type of controller is best suited when you want to add...
Question 136: The Salesforce admin at Cloud Kicks created a custom object ...
Question 137: What can be done to improve the performance of the insert tr...
1 commentQuestion 138: In a VisualForce page with a VisualForce component that has ...
Question 139: A developer has created a Visualforce page that uses a third...
Question 140: What is the transaction limit for the number of DML statemen...
Question 141: An Apex trigger creates a Contract record every time an Oppo...
2 commentQuestion 142: Universal Containers has an existing automation where a cust...
Question 143: A developer gets an error saying 'Maximum Trigger Depth Exce...
3 commentQuestion 144: A company accepts orders for customers in their enterprise r...
Question 145: Which two best practices should the developer Implement to o...
Question 146: A developer has created a Team Member sObject that has a Mas...
Question 147: A company uses Opportunism to track sales to their customers...
Question 148: The Bulk API__________.
Question 149: A company has a custom object Sales_Help_Request__c that has...
Question 150: A developer creates an application event that has triggered ...
Question 151: A developer must create a custom pagination solution for acc...
Question 152: What is the transaction limit on the recursive trigger depth...
Question 153: As part of their quoting and ordering process, a company nee...
Question 154: The Account edit button must be overridden in an org where a...