• lms124
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies

hi every one

 

public class CallWSDLMethod{
 @future(callout=true)
  public static void hi(Id d){
   Book__c b=[select name,Author_name__c from Book__c where id=:d];
 
partnerSoapSforceCom.Soap obj1=new partnerSoapSforceCom.Soap();
partnerSoapSforceCom.LoginResult x=obj1.login('naveenbathula@sfdc.com','9395311706@bnktxFhyI9yuUkFZAKr6gju5p5rd');

soapSforceComSchemasClassS2ssoapaut.s2ssoapauto obj = new soapSforceComSchemasClassS2ssoapaut.s2ssoapauto();
obj.sessionHeader=new soapSforceComSchemasClassS2ssoapaut.sessionHeader_element();
obj.sessionHeader.sessionid=x.sessionId;
obj.mm(b.name,b.author_name__c);
}
}

 

i wrote above pragram for salesforce (org1) to salesforce (org2) integration dano successfully but if  remove callout=true  data is not inserting into org2 .

 

What is actual purpose of @future annotation ?

 

what is the use of callout=true?