Salesforce Certified Platform Developer II Practice Test - Questions Answers, Page 35
List of questions
Related questions
What are three reasons that a developer should write Jest tests for Lightning web components?
Choose 3 answers
A developer created a Lightning web component for the Account record page that displays the five most recently contacted Contacts for an Account. The Apex method, getRecentContacts, returns a list of Contacts and will be wired to a property in the component.
Which two lines must change in the above ode to make the Apex method able to be wired?
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 Apex method prepares and returns data to the component.
What should the developer do to determine which objects to include m the response?
The following code segment is railed from a Trigger handler class from the Opportunity trigger:
Which two changes should improve this code and make it more efficient? Choose 2 answers
A developer is asked to find a way to store secret data with an ability to specify which profiles and users can access which secrets.
What should be used to store this data?
A developer is working with existing functionality that tracks how many times a stage has changed for an Opportunity. When the opportunity's stage is changed, a workflow rule is fired to increase the value of a filed by one. The developer wrote an after trigger to create a child record when the field changes from 4 to 5.
A user changes the stage of an Opportunities and manually sets the count field to 4. The count field updates to 5, but the child record is not created.
What is the reason this is happening?
A developer created a class that implement he Queueable interface, as follows:
As part of the deployment process, the developer is asked to create a corresponding test class.
Which two actions should the developer take to successfully execute the test class?
Choose 2 answers
Universal Containers decided to use Salesforce to manage a new hire interview process. A custom object called candidate as created with organization-wide default set to Private. A lookup on the Candidate object sets an employee as an the viewer user
A developer is writing a Jest for a Lightning web component that conditionally displays child components based on a user's checkbox selections.
What should the developer do to property test that the correct components display and hide for each scenario?
A business requires that every parent record must have a child record. A developer writes an Apex method with two DML statements to insert a parent record and a child record.
A validation rule blocks child records from being created. The method uses a try/catch block to handle the DML exception.
What should the developer do to ensure the parent always has a child record?
Question