Salesforce PDII - Salesforce Certified Platform Developer II (Plat-Dev-301)
Universal Containers uses Salesforce to track orders in an order__c object.
The order = object has private organization-wide defaults. The order = object
has a custom field, Quality_Controller_c, that is a Lookup to User and is used
to indicate that the specified User is performing quality control on the order_ co.
What should be used to automatically give read only access to the User set in the
Quality_Controller field?
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?
Which use case can be performed only by using asynchronous Apex?
A developer created a Lightning web component that uses a lightning-record-edit-form to 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.
What is the recommended approach to perform validations on more than one field, and display multiple error messages simultaneously with minimal JavaScript intervention?
A developer is responsible for formulating the deployment process for a Salesforce project. The project follows a source-driven development approach, and the developer wants to ensure efficient deployment and version control of the metadata changes.
Which tool or mechanism should be utilized for managing the source-driven deployment process?
When the code is executed, the callout is unsuccessful and the following error appears within the Developer Console:
System.CalloutException: Unauthorized endpoint
Which recommended approach should the developer implement
to resolve the callout exception?
Universal Containers is implementing a new approval process for expense reimbursements. The process requires complex logic to determine the appropriate approver based on factors such as expense amount, employee role, and project type. The solution should allow for flexibility and future changes in the approval rules.
Which approach would be the most suitable for implementing this logic?
An environment has two Apex triggers: an after-update trigger on Account and an after-update trigger on Contact.
The Account after-update trigger fires whenever an Account's address is updated, and it updates every associated Contact with that address. The Contact after-update trigger fires on every edit, and it updates every Campaign Member record related to the Contact with the Contact's state.
Consider the following: A mass update of 200 Account records’ addresses, where each Account has 50 Contacts. Each Contact has one Campaign Member. This means there are 10,000 Contact records across the Accounts and 10,000 Campaign Member records across the contacts.
What will happen when the mass update occurs?
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, zudizar_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 _e, that is used to automatically assign the correct user to the Account’s Auditor_c field.
What should be changed to most optimize the code’s efficiency?
Choose 2 answers
A developer implemented a custom data table in a Lightning web component with filter functionality. However, users are submitting support tickets about long load times when the filters are changed. The component uses an Apex method that is called to query for records based on the selected filters.
What should the developer do to improve performance of the component?