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
anvesh@force.comanvesh@force.com 

@future,@istest?

@future  if we use  our code executes  asynchroniously. ok good.  but  what is meant by  asynchroniously executed. what  happens to the code when we   write @future and @istest.  i  am confuse. and what is mean by synchronious and asynchronious.

Best Answer chosen by Admin (Salesforce Developers) 
Devendra@SFDCDevendra@SFDC

Hi,

 

@future, @isTest are the apex annotations which prefixed with @ symbol.

 

@future means the code executed asynchronously when salesforce resources are available.

 

@isTest is to specify the code writted is to cover other code and indicates taht the code Test Code,

 

For more information follow below link,

 

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_annotation.htm

All Answers

Devendra@SFDCDevendra@SFDC

Hi,

 

@future, @isTest are the apex annotations which prefixed with @ symbol.

 

@future means the code executed asynchronously when salesforce resources are available.

 

@isTest is to specify the code writted is to cover other code and indicates taht the code Test Code,

 

For more information follow below link,

 

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_annotation.htm

This was selected as the best answer
sandeep@Salesforcesandeep@Salesforce

As per your question here is difference between synchronious & asynchronious :

synchronious :
Here synchronious process will be performed with full surity in same thread. these do not depend any resources.

Asynchronious :

these type of processes depends on resources available on org.

anvesh@force.comanvesh@force.com

thank you sandeep.really helpfull

NishaCNishaC

Hi sandeep,

 

 

can you please provide me 1 simple example of @future method?