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
MARCO SELLERIMARCO SELLERI 

Webservice called by a trigger

Hi all, 

I've a question and a doubt regarding calling a webservice from a trigger..I'll try to explain.., I have a custom object ( (called Personal Information) with a set of fields, but what I need is that when a SF user fullfil a specific field , let's call it Driving License, a trigger should invoke a webservice called CheckDrivingLicense..

How can I do that in terms of coding? Sorry, but I'm pretty new :)

Thanks,
Marco
 
Ravi Dutt SharmaRavi Dutt Sharma
To perform a callout to webservice from a trigger, you need to use future method @future(callout=true)

More information here :
http://www.greytrix.com/blogs/salesforce/2014/10/30/invoke-future-methods-through-apex-trigger-for-web-service-callout/