How to use method "Future in Apex"
Future method is used to run code that took to long to process, so if you don't want to wait it working, you can used this @future for running it as backgound.
public PageReference TestOne()
{
TestTwo('This is future method');
return null;
}
@future(callout=true)
private static void TestTwo(String desc){
System.debug(desc);
}
Comments
Post a Comment