Answers GRADE A+ SOLUTIONS
Question # 1
A developer observes that an Apex test method fails in the Sandbox. To identify the
issue, the developer copies the code inside the test method and executes it via the
Execute Anonymous tool in the Developer Console. The code then executes with no
exceptions or errors. Why did the test method fail in the sandbox and pass in the
Developer Console?
Options:
A.
The test method has a syntax error in the code.
B.
The test method relies on existing data in the sandbox.
C.
The test method is calling an @future method.
D.
The test method does not use System.runAs to execute as a specific user.
Question # 2
A developer must provide custom user interfaces when users edit a Contact in either
Salesforce Classic or Lightning Experience.
What should the developer use to override the Contact's Edit button and provide this
functionality?
Options:
A.
A Visualforce page in Salesforce Classic and a Lightning component in Lightning
Experience
,B.
A Lightning component in 5alesforce Classic and a Lightning component in lightning
Experience
C.
A Visualforce page in Salesforce Classic and a Lightning page in Lightning
Experience
D.
A Lightning page in Salesforce Classic and a Visualforce page in Lightning
Experience
Question # 3
A developer wants to improve runtime performance of Apex calls by caching result
on the client.
What is the most efficient way to implement this and follow best practices?
Options:
A.
Decorate the server-side method with @AuraEnabled (total-true).
B.
Call the setStoeable () method on the action in the javaScript client-sidecode.
C.
Decorate the server-side method with @AuraEnabled (cacheable-true.
D.
Set a ciikie in the browser for use upon return to the page.
Question # 4
A company has a custom object, Sales, }_Help_Request__c, that has a Lookup
relationship to Opportunity. The Seles Help Request__c has a mumber field,
Number_ct_Hours__c, that represents the amount of time spent on the Sales_Help
Request__
C.
, A developer is tasked with creating a field, total_Hour2__c, on Opportunity that
should be the sum of all of the Number_of_Hours_c values for the
Sales_Help_Request__c records related to that Opportunity.
What should the developer use to implement this?
Options:
A.
A roll-up summary field on the sales Help_Request__c object
B.
A trigger on the Opportunity object
C.
A roll-up summary field on the Opportunity object
D.
A record-triggered flow on the Sales Help Request__c object
Question # 5
What should be used to create scratch orgs?
Options:
A.
Developer Console
B.
Salesforce CLI
C.
Workbench
D.
Sandbox refresh
Question # 6