public PageReference TestOne() { TestTwo('This is future method'); return null; } @future(callout=true) private static void TestTwo(String desc){ System.debug(desc); }
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.
No comments:
Post a Comment