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
A company has an Apex process that makes multiple extensive database operations and web service callouts. The database processes and web services can take a long time to run and must be run sequentially. How should the developer write this Apex code without running into governor limits and system limitations?
A. Use Queueable Apex to chain the jobs to run sequentially.
B. Use Apex Scheduler to schedule each process.
C. Use multiple 3zutuze methods for each process and callout.
D. Use Limits class to stop entire process once governor limits are reached.
Universal Containers stores user preferences in a hierarchy custom setting, user Prefs_c, with a checkbox field, show _help co. Company-level defaults are stored at the organizational level, but may be overridden at the user level. If a user has not overridden preferences, then the defaults should be used. How should the show_Help_ c preference be retrieved for the current user?
A. Boolean show = User_Prefa_ c.getValuea().Show_Help_ co;
B. Boolean show = User Prefs c.getValues(UserInfo.getUserid{)).Show_Help c;
C. Boolean show = User_Prefs_c.getlnstance(].Show Help c;
D. Boolean show = User Prefs_c.show Melp_c;
A developer has a test class that creates test data before making a mock callout but now receives a 'You have uncommitted work pending. Please commit or rollback before calling out’ error. Which step should be taken to resolve the error?
A. Ensure both the Insertion and mock callout occur after the I==L. stoptest_().
B. Ensure the records are Inserted before the Tezt.startTest() statement and the mock callout occurs within a method annotated with @testSetup.
C. Ensure both the insertion and mock callout occur after the Test.startTest().
D. Ensure the records are inserted before the Test.startTess() statement and the mock callout occurs after the Test. Startest().
A developer is trying to decide between creating a Visualforce component or a Lightning component for a custom screen. Which functionality consideration impacts the final decision?
A. Does the screen need to be accessible from the Lightning Experience UI?
B. Does the screen need to be rendered as a PDF without using a thirdparty application?
C. Will the screen make use of a JavaScript framework?
D. Will the screen be accessed via a mobile app?
Instead of waiting to send emails to support personnel directly from the finish method of a batch Apex process, Universal Containers wants to notify an external system in the event that an unhandled exception occurs. What is the appropriate publish/subscribe logic to meet this requirement?
A. Publish the error event using the Eventbus. publish () method.
B. No publishing is necessary. Have the external system subscribe to the BatchapexErrorEvent.
C. Publish the error event using the addError method.
D. Publish the error event with a Flow.
Universal Containers ne=ds to integrate with several external systems. The process Is Initiated when a record Is created in Salesforce, The remote systems do not require Salesforce to wait for a response before continuing. What is the recommended best solution to accomplish this?
A. PushTopic event
B. Qutbound message
C. Trigger with HTTP callout
D. Platform event
A corporation has many different Salesforce orgs, with some different objects and some common objects, and wants to build a single Java application that can create, retrieve, and update common object records in all of the different orgs. Which method of integration should the application use?
A. SOAP API with the Partner WSDL
B. Apex REST Web Service
C. SOAP API with the Enterprise WSDL
D. Metadata APT
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?
A. Check the isCustom() value on the sObject describe result,
B. Import the list of all custom objects from @salesforce/schema.
C. Check the getobiectType [) value for ‘Custom’ or "Standard’ on the sObject describe result.
D. Use the getcustomobjects() method from the Schema class.
Page 4 out of 17 Pages |
Previous |