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.
Page 9 out of 39 Pages |
Previous |