function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
RongzhongHuangRongzhongHuang 

Trigger and Callout

Hi guys,

 

Basically, what I want is to validate a field on a custom object before update. The requirement is to get the value of this field, and then send Http request with this value to another web application, if the result is invalid, display error message on this field.

 

I know that trigger doesn't support callout, so I tried to use a method with @future annotation to work around this limitation.

 

Now the problem is I don't know how to get the result back to trigger and display error message as methods with the future annotation cannot take sObjects or objects as arguments.

 

Does anybody have some suggestion to work around this?

 

Thanks