I am trying to pass some parameters from a future class to the constructor of another class and it is passing nulls values. What is the reason for it? (FYI-The @future class is called from a scheduler class.)

Here is what I am doing by caling the constructor of another class from the @future class:

ClassConstructor cc = new ClassConstructor(true,'test','one','yes',(System.isFuture() || System.isScheduled())); 

Is there a workaround for this?

  • So if you log out any of those ClassConstructor parameters they come out as null? Even the booleans? Can you add the class definition to the question? Commented Jun 20, 2013 at 3:05
  • 1
    There shouldn't be any reason for the values to be null, as Daniel says you're going to have to post more code to get a good answer here.
    – Matt Lacey
    Commented Jun 20, 2013 at 3:47

1 Answer 1


I found the issue. The problem is not with future class. I have not properly used variables in the receiving class. I made the parameters of the receiving constructor different from the assigned variables in the receiving constructor and it worked.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .