A developer must perform a complex SOQL query that joins two objects in a Lightning component. How can the Lightning component execute the query?
A. Invoke an Apex class with the method annotated as @AuraEnabled to perform the query
B. Use the Salesforce Streaming API to perform the SOQL query
C. Create a Process Builder to execute the query and invoke from the Lightning component
D. Write the query in a custom Lightning web component wrapper and invoke from the Lightning component
Universal Containers implements a private sharing model for the Convention_Attendee_ _c custom object. As part of a new quality assurance effort, the company created an Event_Reviewer_ _c user lookup field on the object. Management wants the event reviewer to automatically gain Read/Write access to every record they are assigned to. What is the best approach to ensure the assigned reviewer obtains Read/Write access to the record?
A. Create a criteria-based sharing rule on the Convention Attendee custom object to share the records to a group of Event Reviewers.
B. Create an After Insert trigger on the Convention Attendee custom object, and use Apex Sharing Reasons and Apex Managed Sharing.
C. Create criteria-based sharing rules on the Convention Attendee custom object to share the records with the Event Reviewers.
D. Create a Before Insert trigger on the Convention Attendee custom object, and use Apex Sharing Reasons and Apex Managed Sharing.
Users report that a button on a custom Lightning web component (LWC) is not saving the data they enter. The button looks to be clicked, but the LWC simply sits there, seemingly doing nothing. What should the developer use to ensure error messages are properly displayed?
A. Add a try-catch block surrounding the DML statement.
B. Use the Database method with a110rNone Set to false.
C. Add the tag to the component.
D. Add JavaScript and HTML to display an error message.
Which statement is true regarding savepoints?
A. You can roll back to any savepoint variable created in any order.
B. Static variables are not reverted during a rollback.
C. Reference to savepoints can cross trigger invocations.
D. Savepoints are not limited by DML statement governor limits.
Universal Containers decided to use Salesforce to manage a new hire interview process. A custom object called Candidate was created with organization-wide defaults set to Private. A lookup on the Candidate object sets an employee as an Interviewer. What should be used to automatically give Read access to the record when the lookup field is set to the Interviewer user?
A. The record can be shared using an Apex class.
B. The record can be shared using a permission set.
C. The record can be shared using a sharing rule.
D. The record cannot he shared with the current setup.
What is the best practice to initialize a Vizualforce page in a test class?
A. Use Test. setCurrentPage (Page. MyTeatPage);
B. Use Test. currantPage .getParamatars put (MyTaestPaga) ;
C. Use controller. currentPage. setPage (MyTastfage) ;
D. Use Test. setCurrentPage MyTestPags;
A developer is tasked with ensuring that email addresses entered into the system for Contacts and for a custom object called survey Response c do not belong to a list of blocked domains. The list of blocked domains is stored in a custom object for ease of maintenance by users. The survey Response c object is populated via a custom Visualforce page. What is the optimal way to implement this?
A. Implement the logic in validation rules on the Contact and the Burvey Response_c Objects.
B. Implement the logic in a helper class that is called by an Apex trigger on Contact and from the custom Visualforce page controller.
C. Implement the logic in an Apex trigger on Contact and also implement the logic within the custom Visualforce page controller.
D. Implement the logic in the custom Visualforce page controller and call "that method from an Apex trigger on Contact.
There is an Apex controller and a Visualforce page in an org that displays records with a custom filter consisting of a combination of picklist values selected by the user. The page takes too long to display results for some of the input combinations, while for other input choices it throws the exception, "Maximum view state size limit exceeded”. What step should the developer take to resolve this issue?
A. Adjust any code that filters by picklist values since they are not indexed,
B. Remove instances of the transient keyword from the Apex controller to avoid the view state error.
C. Use a StandardSetController or SOQL LIMIT in the Apex controller to limit the number of records displayed at a time.
D. Split the layout to filter records in one Visualforce page and display the list of records in a second page using the same Apex controller.
A developer is asked to find a way to store sacret data with an ability to specify which profiles and users can access which secrets. What should be used to store this data?
A. system.Cookie class
B. Custom settings
C. Static resources
D. Custom metadata
A company uses Salesforce to sell products to customers. They also have an external product information management (PIM) system that is the system of record for products. A developer received these requirements: * Whenever a product is created or updated in the PIM, a product must be created or updated as a Product? record in Salesforce and a PricebookEntry record must be created or updated automatically by Salesforce. = The PricebookEntry should be created in a Priceboek2 that is specified in a custom setting. What should the developer use to satisfy these requirements?
A. Event Monitoring
B. Invocable Action
C. SObject Tree REST
D. Custom Apex REST
Page 4 out of 9 Pages |
Previous |