PDI Salesforce Certified Platform Developer 1 (SP25) Questions and Answers
A developer completed modifications feature that is comprised of two elements:
* Apex trigger
* Trigger handler Apex class
What are two factors that the developer must take into account to properly deploy them to the production environment?
Choose 2 answers
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?
Which statement describes the execution order when triggers are associated to the same object and event?
The Job_Application__c custom object has a field that is a master-detail relationship to the Contact object, where the Contact object is the master.
As part of a feature implementation, a developer needs to retrieve a list containing all Contact records where the related Account Industry is ' Technology ' , while also retrieving the Contact ' s Job_Application__c records.
Based on the object ' s relationships, what is the most efficient statement to retrieve the list of Contacts?
A developer has the following requirements:
• Calculate the total amount on an Order.
• Calculate the line amount for each Line Item based on quantity selected and price.
• Move Line Items to a different Order if a Line Item is not in stock.
Which relationship implementation supports these requirements on its own?
An org has an existing flow that edits an Opportunity with an Update Records element. A developer must update the flow to also create a Contact and store the created Contact’s ID on the Opportunity.
Which update must the developer make in the flow?
Which two statements are true about using the @testSetup annotation in an Apex test class?
Choose 2 answers
Which code statement includes an Apex method named updateAccounts in the class AccountController for use in a Lightning web component?
A company has a custom object, order __c, that has a required, unique external ID field called order Number__c.
Which statement should be used to perform the DML necessary to insert new records and update existing records in a list of Order __c records
using the external ID field?
The values ' High ' , ' Medium ' , and ' Low ' are identified as common values for multiple picklists across different objects.
What is an approach a developer can take to streamline maintenance of the picklists and their values, while also restricting the values to the ones mentioned above?
Flow Builder uses an Apex action to provide additional information about multiple Contacts, stored in a custom class ContactInfo.
Which is the correct definition of the Apex method that gets the additional information?
Universal Containers wants to ensure that all new leads created in the system have a valid email address. They have already created a validation rule to enforce this requirement, but want to add an additional layer of validation using automation.
What would be the best solution for this requirement?
A developer is alerted to an issue with a custom Apex trigger that is causing records to be duplicated.
What is the most appropriate debugging approach to troubleshoot the issue?
How can a developer check the test coverage of autolaunched Flows before deploying them in a change set?
In the following example, which sharing context will myMethod execute when it is invoked?
What should a developer use to script the deployment and unit test execution as part of continuous integration?
A lead developer creates a virtual class called " OrderRequest " . Consider the following code snippet:
Public class CustomerOrder {
//code implementation
}
How can a developer use the OrderRequest class within the CustomerOrder class?
(Full question statement)
Universal Containers wants Opportunities to no longer be editable when they reach the Closed/Wonstage.
Which two strategies can a developer use to accomplish this?
Choose 2 answers.
Universal Containers decided to transition from Classic to Lightning Experience. They asked a developer to replace a JavaScript button that was being used to create records with prepopulated values.
What can the developer use to accomplish this?
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?
Refer to the following Apex code:
apex
Copy
Integer x = 0 ;
do {
x++ ;
} while (x < 1) ;
System.debug(x) ;
What is the value of x when it is written to the debug log?
What are three capabilities of the < ltng: require > tag when loading JavaScript resources in Aura components?
Choose 3 answers
A company decides to implement a new process where every time an Opportunity is created, a follow up Task should be created and assigned to the Opportunity Owner.
What is the most efficient way for a developer to implement this?
The following code snippet is executed by a Lightning web component in an environment with more than 2,000 lead records:

Which governor limit will likely be exceeded within the Apex transaction?
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?
A developer has a single custom controller class that works with a Visualforce Wizard to support creating and editing multiple sObjects. The wizard accepts data from user inputs across multiple Visualforce pages and from a parameter on the initial URL.
Which three statements are useful inside the unit test to effectively test the custom controller?
Choose 3 answers
An Apex method, getAccounts, that returns a List of Accounts given a searchTerm, is available for Lightning Web Components to use.
What is the correct definition of a Lightning Web Component property that uses the getAccounts method?
A developer is implementing an Apex class for a financial system. Within the class, the variables ' creditAmount ' and ' debitAmount ' should not be able to change once a value is assigned.
In which two ways can the developer declare the variables to ensure their value can only be assigned one time?
Choose 2 answers
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?
If Apex code executes inside the execute() method of an Apex class when implementing the Batchable interface, which two statements are true regarding governor limits?
Choose 2 answers
What are three considerations when using the @lnvocableMethod annotation in Apex?
Choose 3 answers
A company ' s engineering department is conducting a month-long test on the scalability of an in-house-developed software that requires a cluster of 100 or more servers. Which of the following models is the best to use?
Universal Containers wants to assess the advantages of declarative development versus programmatic customization for specific use cases in its Salesforce implementation.
What are two characteristics of declarative development over programmatic customization?
Choose 2 answers
Which Lightning Web Component custom event property settings enable the event to bubble up the containment hierarchy and cross
the Shadow DOM boundary?
A developer must create a Lightning component that allows users to input Contact record information to create a Contact record, including a Salary__c custom field.
What should the developer use, along with a lightning-record-edit-form, so that Salary__c field functions as a currency input and is only viewable and editable by users that have the correct field-level permissions on Salary__c?
Which two operations affect the number of times a trigger can fire?
Choose 2 answers

When the code executes, a DML exception is thrown.
How should a developer modify the code to ensure exceptions are handled gracefully?
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?
The value of the account type field is not being displayed correctly on the page. Assuming the custom controller is properly referenced on the Visualforce page, what should the developer do to correct the problem?
Management asked for opportunities to be automatically created for accounts with annual revenue greater than $1, 000,000. A developer created the following trigger on the Account object to satisfy this requirement.
for (Account a : Trigger.new) {
if (a.AnnualRevenue > 1000000) {
List < Opportunity > oppList = [SELECT Id FROM Opportunity WHERE AccountId = :a.Id];
if (oppList.size() == 0) {
Opportunity oppty = new Opportunity(Name = a.Name, StageName = ' Prospecting ' , CloseDate = System.today().addDays(30));
insert oppty;
}
}
}
Users are able to update the account records via the UI and can see an opportunity created for high annual revenue accounts. However, when the administrator tries to upload a list of 179 accounts using Data Loader, it fails with system, Exception errors.
Which two actions should the developer take to fix the code segment shown above?
Choose 2. answers
A custom object Trainer__c has a lookup field to another custom object Gym__c.
Which SOQL query will get the record for the Viridian City Gym and all it ' s trainers?
A developer considers the following snippet of code:
Boolean isOK;
Integer x;
String theString = ' Hello ' ;
if (isOK == false & & theString == ' Hello ' ) {
x = 1;
} else if (isOK == true & & theString == ' Hello ' ) {
x = 2;
} else if (isOK == null & & theString == ' Hello ' ) {
x = 3;
} else {
x = 4;
}
Based an this code, what is the value of x?
Consider the following code snippet:
public static List < Lead > obtainAllFields(Set < Id > leadIds) {
List < Lead > result = new List < Lead > ();
for (Id leadId : leadIds) {
result.add([SELECT FIELDS(ALL) FROM Lead WHERE Id = :leadId]);
}
return result;
}
Given the multi-tenant architecture of the Salesforce platform, what is a best practice a developer should implement to ensure successful execution of the method?
When a user edits the Postal Code on an Account, a custom Account text field named " Timezone " must be updated based on the values in another custom object called PostalCodeToTimezone__c.
What is the optimal way to implement this feature?
A developer must provide custom user interfaces when users edit a Contact in either Salesforce Classic or Lightning Experience.
What should the developer use to override the Contact ' s Edit button and provide this functionality?
What can be used to override the Account ' s standard Edit button for Lightning Experience?
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?
Universal Containers (UC) processes orders in Salesforce in a custom object, Order__c. They also allow sales reps to upload CSV files with thousands of orders at a time.
A developer is tasked with integrating orders placed in Salesforce with UC ' s enterprise resource planning (ERP) system.
After the status for an Order__c is first set to ' Placed ' , the order information must be sent to a REST endpoint in the ERP system that can
process one order at a time.
What should the developer implement to accomplish this?
Universal Containers decides to use purely declarative development to build out a new Salesforce application.
Which two options can be used to build out the business logic layer for this application?
Choose 2 answers
A team of developers is working on a source-driven project that allows them to work independently, with many different org configurations.
Which type of Salesforce orgs should they use for their development?
How does the Lightning Component framework help developers implement solutions faster?
