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

Popular posts from this blog

Privacy Policy

Query in Loop problem: ( we do not need to to select query in loop )

How to set up vscode with salesforce sandbox