The requirement is to lock the record so that nobody can delete a record if the purchase order is approved.
And the solution is with a small automation script on DOCLINKS object:
object: DOCLINKS
event: BEFORE SAVE
Type: Object Launch Point
Script: Jython
owner=mbo.getOwner()
if owner and owner.getName()=="PO" and owner.getInternalStatus()=="APPR"
service.error("","Purchase Order is approved. ")
Also ideal to control it via the signature option, create a new signature option from the application designer and grant access using the relevant security groups then just use it in your code. thanks to Steven Shull.
owner.sigopGranted("DELETEATTACH"):
No comments:
Post a Comment