A company wants to incorporate a third-party web service to set the Address fields when an Account is inserted, if they have not already been set. What is the optimal way to achieve this?
A.
Create a Process, call an Apex @future(callout=true) method from it, and make the callout from that Apex method.
B.
Create a Process, call an Apex @InvocableMethod from it, and make the callout from that Apex method.
C.
Create an after insert trigger, call an Apex @InvocableMethod method from it, and make the callout from that Apex method.
D.
Create an after insert trigger, call an @future(callout=true) method from it, and make the callout from that Apex method.
C and D can't update Address field in After context
A use @future annotation =>It's made async function, so that we can't catch value of Address field by sycn way
I'll will go for B answer, which the best choice I considered.
why not A..process can also do the same with less code approach
upvoted 2 times
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Rocky_sfdc
Highly Voted 3 years, 9 months agoAnjindal
Most Recent 5 months, 3 weeks agoNot_Nam
1 year, 4 months agoKK13
2 years, 10 months agoabhichauhan
3 years, 10 months ago