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
8 months agoCrissy
9 months agoRebecka
9 months agoAlline
9 months agoLeatha
9 months agoVal
10 months agoPercy
10 months agoJerrod
10 months agoTayna
10 months agoNathalie
10 months agoAriel
11 months agoYuki
11 months agoDeeanna
11 months agoXuan
11 months ago