- (Exam Topic 3)
An org has a Process Builder process on Opportunity that sets a custom field,CommissionBaseAmount c, when an Opportunity is edited and the Opportunity's Amount changes.
A developer recently deployed an Opportunity before update trigger that uses the CommissionBaseAmount c and complex logic to calculate a value for a custom field CommissionAmount_c, when an Opportunity stage changes to Closed/Won.
Users report that when they change the Opportunity to Closed/Won and also change the Amount during the same save, the C:rr.i;5icnA.T.cur.t c is incorrect.
Which two actions should the developer take to correct this problem? Choose 2 answers
Correct Answer:
AC
- (Exam Topic 1)
Example 1: AggregateResult[] groupedResults = [SELECT Campaignid, AVG(Amount) FROM Opportunity GROUP BY CampaignId]; for (AggregateResult ar : groupedResuits) { System.debug ('Campaign ID' + ar.get('CampaignId'-); System.debug ('Average amount' + ar.get('exprd')); } Example 2: AggregateResult[] groupedResults = [SELECT Campaignid, AVG(Amount) theAverage FROM Opportunity GROUP BY Campaignid]; for (AggregateResult ar : groupedResuits) { System.debug(*Campaign ID' + ar.get('CampaignId')); System.debug ('Average amount' + ar.get('theAverage')); } Example 3: AggregateResult[] groupedResults = [SELECT CampaignId, AVG(Amount) FROM Opportunity GROUP BY CampaignId]; for (AggregateResult ar : groupedResuits) System.debug(*Campaign ID' + ar.get('CampaignId')); System.debug('Average amount' + ar.get.AVG(-); } Example 4:AggregateResult[] groupedResults = [SELECT CampaigniId, AVG(Amount) theAverage FROM Opportunity GROUP BY Campaignid]; for (AggregateResult ar : groupedResults) { System.debug('Campaign ID' + ar.get('CampaignId')); System.debug ('Average amount' + ar.theAverage-; } Which two of the examples above have correct System.debug statements? Choose 2 answers
Correct Answer:
AB
- (Exam Topic 3)
Which two queries are selective SOQL queries and can be used for a large data set of 200,000 Account records? Choose 2 answers
Correct Answer:
CD
- (Exam Topic 1)
A developer needs test data for Apex test classes.
What can the developer use to provide test data to the test methods? (Choose two.)
Correct Answer:
AB
- (Exam Topic 3)
A developer wrote an Apex method that makes an HTTP callout to an external system to get specialized data when a button is clicked from a custom Lightning web component on the Account record page.
Recently, users have complained that it takes longer than desired for the data to appear on the page after clicking the button.
What should the developer use to troubleshoot this issue?
Correct Answer:
A