I'm using a modified PO20 form for ProcessFlow PO approvals and my client didn't like the many steps required to add a comment to the PO (which I'm sending to the buyer to explain why their PO was being rejected). I am using the writeattach.exe CGI to add the comment from a Text Area on my form when the user clicks a "Add Comment" button.
if (id=="push11")
{
var vProd = portalWnd.oUserProfile.getAttribute("productline");
var vComm = lawForm.getFormValue("textarea1");
s = "/cgi-lawson/writeattach.exe?_OUT=XML&_PDL=" + vProd;
s += "&_FN=PURCHORDER&_IN=PCRSET1&K1=1";
s += "&K2=" + lawForm.getFormValue("text6");
s += "&K3=" + lawForm.getFormValue("text4");
s += "&K4=" + lawForm.getFormValue("text5");
s += "&_ATYP=C&_AUDT=O";
s +="&_USCH=none&_DATA=TRUE&_OPM=M&_ECODE=FALSE&_ANAM=Approval Comment";
s += "&_ATXT=" + vComm;
alert ("Your comments have been accepted.")
portalWnd.httpRequest(s);
}
The comment types (&_AUDT= ) are:
B – Purchase Order Bill To Address
D – Comment to Print on Delivery Ticket
E – Purchase Order Copy Comments and Errors
I – Comments to Print on Headers on Internal Documents
N – Invoice Comments
O – Purchase Order Header Display Only Comments
P – Comments to Print on Purchase Orders
Q – Comments Pertaining to Vendor Contacts
R – Comments to Print on Receiving Documents
T – Comments to Print on Purchase Orders as Trailer Comments