Activity Forums Salesforce® Discussions Why objects cannot be passed as an argument in future methods in Salesforce?

  • Why objects cannot be passed as an argument in future methods in Salesforce?

    Posted by Deepak on June 2, 2020 at 10:10 am

    Why objects cannot be passed as an argument in future methods in Salesforce?

    Marziya replied 4 years, 5 months ago 2 Members · 1 Reply
  • 1 Reply
  • Marziya

    Member
    June 2, 2020 at 12:51 pm

    The reason why sObjects can't be passed as arguments to future methods is because the sObject might change between the time you call the method and the time it executes. In this case, the future method will get the old sObject values and might overwrite them.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos