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