Which strategy can a developer use to improve the performance?
A Visualforce page loads slowly due to the large amount of data it displays. Which strategy can a developer use to improve the performance?A . Use Javascript to move data processing to the browser instead of the controller.B . Use the transient keywords for the List variables used in the...
Which two of the examples above have correct System.debug statements? (Choose two.)
Which two of the examples above have correct System.debug statements? (Choose two.) Example 1: AggregateResult[] groupedResults = [SELECT CampaignId, AVG(Amount) FROM Opportunity GROUP BY CampaignId]; for (AggregateResult ar : groupedResults) { System.debug('Campaign ID' + ar.get('CampaignId')); System.debug('Average amount' + ar.get('expr0')); } Example 2: AggregateResult[] groupedResults = [SELECT CampaignId, AVG(Amount) theAverage FROM...
What is the optimal way for a developer to get the total number of Opportunities for the Lightning Component?
Part of a custom Lightning Component displays the total number of Opportunities in the org, which is in the millions. The Lightning Component uses an Apex Controller to get the data it needs. What is the optimal way for a developer to get the total number of Opportunities for the...
What is the optimal method to implement this?
A company processes Orders within their Salesforce instance. When an Order’s status changes to 'Paid' it must notify the company’s order management system (OMS). The OMS exposes SOAP web service endpoints to listen for when to retrieve the data from Salesforce. What is the optimal method to implement this?A ....
How can the developer generate the code coverage?
An Apex class does not achieve expected code coverage. The testSetup method explicitly calls a method in the Apex class. How can the developer generate the code coverage?A . Verify the user has permissions passing a user into System.runAs().B . Call the Apex class method from a testMethod instead of...
Which two changes should a developer make in this trigger to adhere to best practices?
Consider the above trigger intended to assign the Account to the manager of the Account’s region. trigger AssignOwnerByRegion on Account ( before insert, before update ) { List<Account> accountList = new List<Account>(); for( Account anAccount : trigger.new ) { Region__c theRegion = [ SELECT Id, Name, Region_Manager__c FROM Region__c WHERE...
What will happen when the mass update occurs?
An environment has two Apex Triggers: an after-update trigger on Account and an after-update trigger on Contact. The Account after-update trigger fires whenever an Account’s address is updated, and it updates every associated Contact with that address. The Contact after-update trigger fires on every edit, and it updates every Campaign...
What should the developer do to ensure a more meaningful message?
A user receives the generic "An internal server error has occurred" while interacting with a custom Lightning Component. What should the developer do to ensure a more meaningful message?A . Add an onerror event handler to the tag.B . Add an error-view component to the markup.C . Use an AuraHandledException...
Which scenario necessitates that the callout be made in an @future method?
A developer is writing code that requires making callouts to an external web service. Which scenario necessitates that the callout be made in an @future method?A . The callouts will be made in an Apex Trigger.B . The callouts will be made in an Apex Test class.C . The callout...
What is the optimal method for a developer to troubleshoot this?
An Apex trigger creates an Order__c record every time an Opportunity is won by a Sales Rep. Recently the trigger is creating two orders. What is the optimal method for a developer to troubleshoot this?A . Set up debug logging for every Sales Rep, then monitor the logs for errors...