The following Apex method is part of the ContactService class that is called from a trigger:How should the developer modify the code to ensure best practices are met?A)C)D)
Ah, I see what they're getting at. Option C is the way to go - it avoids the unnecessary SOQL query and updates the contact record in a single transaction.
Option A looks good to me - it removes the unnecessary SOQL query and updates the contact record directly. That seems like the most efficient approach.
Nada
7 months agoCrissy
7 months agoRebecka
7 months agoAlline
8 months agoLeatha
8 months agoVal
8 months agoPercy
8 months agoJerrod
9 months agoTayna
9 months agoNathalie
9 months agoAriel
9 months agoYuki
9 months agoDeeanna
9 months agoXuan
10 months ago