Well, there're at least two problems.console.log("after fix null test");There's log method in Acrobat's console object, it's println instead. console.println("after fix null test"); Also, what is the reference? A scriptobject? Do you have a form you can share? That would be much easier to check.Vali...