doc.getCurrentPhase doesnt return Executed phase
I have written a script on onLoad for a contract(2002 class). I have to enable/disable an extension collection based on the phase in which the contract is there. So i have written the following code.
But the problem is doc.getCurrentPhase().getDisplayName() is returning a value only when the contract is in draft stage. If the contract is moved to any other phase like supplier draft, waiting for approval or executed doc.getCurrentPhase().getDisplayName() is not returning anything.
Thanks in advance.