Free Salesforce Plat-Dev-301 Exam Practice Questions
Salesforce Certified Platform Developer II
Total Questions: 161Focus Only on What Matters For Salesforce Plat-Dev-301 Exam Preparation
Many candidates desire to prepare their Salesforce Plat-Dev-301 exam with the help of only updated and relevant study material. But during their research, they usually waste most of their valuable time with information that is either not relevant or outdated. Study4Exam has a fantastic team of subject-matter experts that make sure you always get the most up-to-date preparatory material. Whenever there is a change in the syllabus of the Salesforce Certified Platform Developer II exam, our team of experts updates Plat-Dev-301 questions and eliminates outdated questions. In this way, we save you money and time.
Salesforce Plat-Dev-301 Exam Sample Questions & Answers
Universal Containers has an Apex trigger on Account that creates an Account Plan record when an Account is marked as a Customer. Recently a record-triggered flow was added to update a date field. Since the addition of the flow, two Account Plan records are created. What might cause this to happen?
An org has a requirement that an Account must always have one and only one Contact listed as Primary. So selecting one Contact will de-select any others. The client wants a checkbox on the Contact called 'Is Primary' to control this feature. The client also wants to ensure that the last name of every Contact is stored entirely in uppercase characters. What is the optimal way to implement these requirements?12345
The Account object has a field, Audit_Code__c, that is used to specify what type of auditing the Account needs and a Lookup to User, Auditor__c, that is the assigned auditor. When an Account is initially created, the user specifies the Audit_Code__c. Each User in the org has a unique text field, Audit_Code__c, that is used to automatically assign the correct user to the Account's Auditor__c field.
Trigger:
Java
trigger AccountTrigger on Account (before insert) {
AuditAssigner.setAuditor(Trigger.new);
}
Apex Class:
Java
public class AuditAssigner {
public static void setAuditor(List
for (User u : [SELECT Id, Audit_Code__c FROM User]) {
for (Account a : accounts) {
if (u.Audit_Code__c == a.Audit_Code__c) {
a.Auditor__c = u.Id;
}
}
}
}
}
What should be changed to most optimize the code's efficiency?
MyOpportunities.js
JavaScript
import { LightningElement, api, wire } from 'lwc';
import getOpportunities from '@salesforce/apex/OpportunityController.findMyOpportunities';
export default class MyOpportunities extends LightningElement {
@api userId;
@wire(getOpportunities, {oppOwner: '$userId'})
opportunities;
}
OpportunityController.cls
Java
public with sharing class OpportunityController {
@AuraEnabled
public static List
return [
SELECT Id, Name, StageName, Amount
FROM Opportunity
WHERE OwnerId = :oppOwner
];
}
}
A developer is experiencing issues with a Lightning web component. The co12mponent must surface information about Opportunities owned by the currently logged-in user. When the component is rendered, the following message is displayed: "Error retrieving data". Which action must be completed in the Apex method to make it wireable?13
Refer to the markup below:
HTML
record-id={recordId} object-api-name="Account" layout-type="Full">
A Lightning web component displays the Account name and two custom fields out of 275 that exist on the object. The custom fields are correctly declared and populated. However, the developer receives complain2223ts that the component performs slowly. What can the developer d2425o to improve the performance?
Currently there are no comments in this discussion, be the first to comment!