You need to sign in to do that
Don't have an account?
Davi D11801
How do I make future method call outside of a contact loop?
On the contact trigger after update and after insert, with trigger.new, we are trying to make a future method call on contactid and associated accountid. We got a message of too many future method call.
I talked to support and support suggested to do the future mothod call outside of the contact trigger.new loop. But, I am not sure how to do that. Thank you in advance for your help!
I talked to support and support suggested to do the future mothod call outside of the contact trigger.new loop. But, I am not sure how to do that. Thank you in advance for your help!
It's fairly straight forward. You wil likely need to change the signature of your future call or add another future call to accept a list of ids rather than a singular Id. Here is an example of generating a list of Strings and then passing them in to a future call: https://developer.salesforce.com/blogs/developer-relations/2013/06/passing-objects-to-future-annotated-methods.html