Monday, November 14, 2016

Explain few considerations for @Future annotation in Apex.

  • Method must be static
  • Cannot return anything ( Only Void )
  • To test @future methods, you should use startTest and stopTest to make it synchromouse inside Test class.
  • Parameter to @future method can only be primitive or collection of primitive data type.
  • Cannot be used inside VF in Constructor, Set or Get methods.
  • @future method cannot call other @future method.

No comments:

Post a Comment