PDI Practice Questions
Salesforce Certified Platform Developer (Plat-Dev-201)
Last Update 7 hours ago
Total Questions : 204
Dive into our fully updated and stable PDI practice test platform, featuring all the latest Developers exam questions added this week. Our preparation tool is more than just a Salesforce study aid; it's a strategic advantage.
Our free Developers practice questions crafted to reflect the domains and difficulty of the actual exam. The detailed rationales explain the 'why' behind each answer, reinforcing key concepts about PDI. Use this test to pinpoint which areas you need to focus your study on.
Consider the following code snippet:
apex
CopyEdit
public class with sharing AccountsController {
@AuraEnabled
public List
return [SELECT Id, Name, Industry FROM Account];
}
}
Apex Test Class Snippet:
apex
CopyEdit
@isTest
private class with sharing AccountsController_Test {
@testSetup
private static void makeData(){
User user1 = [SELECT Id FROM User WHERE Profile.Name = 'System Administrator' AND isActive = true LIMIT 1];
User user2 = [SELECT Id FROM User WHERE Profile.Name = 'Standard User' AND UserName = 'test@test.com' AND isActive = true LIMIT 1];
TestUtils.insertAccounts(10, user1.Id);
TestUtils.insertAccounts(20, user2.Id);
}
@isTest
private static void getAllAccounts_StandardUser_Test(){
List
System.assertEquals(20, result.size());
}
}
When the test class runs, the assertion fails.
Which change should the developer implement in the Apex test method to ensure the test method executes successfully?
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 created a child Lightning web component nested inside a parent Lightning web component. The parent component needs to pass a string value to the child component.
In which two ways can this be accomplished?
Choose 2 answers
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?
A developer creates a batch Apex job to update a large number of records, and receives reports of the job timing out and not completing.
What is the first step towards troubleshooting the issue?
Which two are best practices when it comes to Aura component and application event handling?
Choose 2 answers
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?
Universal Containers wants to automatically assign new cases to the appropriate support representative based on the case origin. They have created a custom field on the Case object to store the support representative name.
What is the best solution to assign the case to the appropriate support representative?
While writing an Apex class, a developer wants to make sure that all functionality being developed is handled as specified by the requirements.
Which approach should the developer use to be sure that the Apex class is working according to specifications?
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?
