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 8 out of 39 Pages |
Previous |