Hi Experts,
We have a requirement that once a contract document is approved and is in certain phase (not executed), we should not allow the contract document to be modified. I am trying to disable the option to 'Check out' in this phase - either disable, or throw an error.
However, any error i throw on the checkout info object does not seem to work. An error is logged in NW logs, but nothing on the UI.
Checkout info Validated event document lifecycle script:
ctr = doc.getParentIBean();
if(hasValue(ctr))
{
isApprovedExt = ctr.getExtensionField("Test");
if(hasValue(isApprovedExt))
{
isApproved = isApprovedExt.get();
if(hasValue(isApproved) && isApproved.equals("APPROVED"))
{
throw doc.createApplicationException("Test", "Cannot check out in Signatures phase");
}
}
}
Any idea what I am not doing right?
Regards,
Subhasini