Discussions
Type Approve on Purchase Orders
Hey Guys,
I basically want to send off an email once a purchase order has been approved.
This would be simple if I could simply depend on the type to do this but I have a problem where ours POs often have multiple approvers. If I have the nlapiSendEmail running based on type == approve, an email is fired off everytime one of the approvers approves the order. I only want the email to be sent on the final approval.
I've been trying to use the 'supervisorapproval' check box to do this but again I have a problem. When trying to access this field when type == approve, I have to load the record as nlapiGetOldRecord otherwise it doesn't return a value. If I use nlapiGetOldRecord to load the record, the field reads as false even though the order has now been approved.