Salesforce PDII - Salesforce Certified Platform Developer II (Plat-Dev-301)
Consider the below trigger intended to assign the Account to the manager of the Account's region:
Which two changes should a developer make in this trigger to adhere to best practices?
Choose 2 answers
A developer writes a Lightning web component that displays a dropdown list of all custom objects in the org from which a user will select. An Apex method prepares and returns data to the component.
What should the developer do to determine which objects to include in the response?
What are three reasons that a developer should write Jest tests for Lightning web components?
Choose 3 answers
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?
A company has reference data stored in multiple custom metadata records that represent default information and delete behavior for certain geographic regions.
When a contact is inserted, the default information should be set on the contact from the custom metadata records based on the contact's address information.
Additionally, if a user attempts to delete a contact that belongs to a flagged region, the user must get an error message.
Depending on company personnel resources, what are two ways to automate this?
Choose 2 answers
Given a list of Opportunity records named opportunityList, which code snippet is best for querying all Contacts of the Opportunity's Account?
A)
B)
C)
D)
A developer is writing a Jest test for a Lightning web component that conditionally displays child components based on a user's checkbox selections.
What should the developer do to properly test that the correct components display and hide for each scenario?
Universal Containers allows customers to log into a Salesforce Community and update their orders via a custom Visualforce page. Universal Containers’ sales representatives can edit the orders on the same Visualforce page.
What should a developer use in an Apex test class to test that record sharing is enforced on the Visualforce page?
A company has a web page that needs to get Account record information, such as name, website, and employee number. The Salesforce record 1D is known to the web page and it uses JavaScript to retrieve the account information.
Which method of integration is optimal?
What is a benefit of JavaScript remoting over Visualforce Remote Objects?