You need to sign in to do that
Don't have an account?

Response from Callouts
Hi,
I hav one requirement.we developing one App which is integrated to 3rd party,here intigrations involve both ways of Leads syncing.
Here my 3rd party having Monthly limit of new Leads by user wise.so i need to achieve same functionality in Salesforce side.
i wrote total syncing code in Future callouts.Here whenever monthly limit reached ,3rd party sent a response as 'Your limit reached'.
i get the response but struct at displaying response Message through triggger(by using addError method).
i done some ways:
1)In my future class,insert response in temp object .and get that Present response in trigger after calling future Method and display the message using addError method.
But i fail,may be the reason is trigger is not waitng for resopnse.
can any one Help Me for this
I hav one requirement.we developing one App which is integrated to 3rd party,here intigrations involve both ways of Leads syncing.
Here my 3rd party having Monthly limit of new Leads by user wise.so i need to achieve same functionality in Salesforce side.
i wrote total syncing code in Future callouts.Here whenever monthly limit reached ,3rd party sent a response as 'Your limit reached'.
i get the response but struct at displaying response Message through triggger(by using addError method).
i done some ways:
1)In my future class,insert response in temp object .and get that Present response in trigger after calling future Method and display the message using addError method.
But i fail,may be the reason is trigger is not waitng for resopnse.
can any one Help Me for this
Future is more of the asynchronuos call , you can not depend on the result from the future method and then check in the trigger .
trigger and future both will run in the different thread and will not communicate .
you have to make sure that no dependecy should be there from futrue method .
Hope this helps :)
·
thanks for ur reply
can you advise any other possible ways....
but make sure that class should not be called from trigger either .
anyway try avioding callout from trigger , and see how can you acheive the desiered result .
Best of Luck !!