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.
A developer is asked to develop a new AppFxchange application. A feature of the program creates Survey records when a Case reaches a certain stage and is of a certain Record Type. This feature needs to be configurable, as different Salesforce instances require Surveys at different times. Additionally, the out-of-the-box AppExchange app needs to come with a set of best practice settings that apply to most customers. What should the developer use to store and package the custom configuration settings for the app?
A. Custom objects
B. Custom settings
C. Custom metadata
D. Custom labels
There are user complaints about slow render times of a custom data table within a Visualforce page that loads thousands of Account records at once. What can a developer do to help alleviate such issues?
A. Use JavaScript remoting to query the accounts.
B. Use the transient keyword in the Apex code when querying the Account records.
C. Upload a third-party data table library as a static resource.
D. Use the standard Account List controller and implement pagination.
Page 5 out of 20 Pages |
Previous |