A developer created a Lightning web component that allows users to input a text value that is used to search for Accounts by calling an Apex method. The Apex method returns a list of AccountWrappers and is called imperatively from a JavaScript event handler.
Java
01: public class AccountSearcher {
02:
03: public static List
04: List
05: return wrappers;
06: }
07:
08:
09: public class AccountWrapper {
10: public Account account { get; set; }
11: public Decimal matchProbability { get; set; }
12: }
13: // ...other methods, including getMatchingAccountWrappers implementation...
14: }
Which two changes should the developer make so the Apex method functions correctly?
A software company uses a custom object, Defect__c, to track defects in their software. Defect__c has organization-wide defaults set to private. Each Defect__c has a related list of Reviewer__c records, each with a lookup field to User that is used to indicate that the User will review the Defect__c. What should be used to give the User on the Reviewer__c record read only access to the Defect__c record on the Reviewer__c record?34
A Salesforce developer is hired by a multi-national company to build a custom Lightning application that shows employees their employment benefits and earned commissions over time. The application must acknowledge and respect the user's locale context for dates, times, numbers, currency, and currency symbols. When using Aura components, which approach should the developer implement to ensure the Lightning application complies with the user's locale?3
Business rules require a Contact to always be created when a new Account is created. What can be used when developing a custom screen to ensure an Account is not created if the creation of the Contact fails?
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?