function FORM_OnAfterTransaction(rowNum) { var vComp = lawForm.getFormValue("text1"); var vInv = lawForm.getFormValue("text2"); var vCust = lawForm.getFormValue("text3");
//was transaction successful? if (formState.agsError) return;
for (var rowNum = 0; rowNum < 5; ++rowNum) { //get Line Number var vLine = lawForm.getDataValue("BUL-LINE-NBR",rowNum); //alert("Line number is: "+vLine+"; rownumber is "+rowNum);
//reset desc to blank for each detail line
var vDesc = "";
//Do DME call if there is Line Nbr if(vLine != "") { var s = portalWnd.DMEPath; s += "?DEV="; s += "&FILE=BLRILUF"; s += "&FIELD=DESCRIPTION"; s += "&INDEX=BLRSET1"; s += "&KEY="; s += vComp; s += "="; s += vCust; s += "="; s += vInv; s += "="; s += vLine; s += "&XCOLS=TRUE&XKEYS=TRUE&XRELS=TRUE&XCOUNT=TRUE&XIDA=TRUE&OUT=XML"; //alert("string is "+s) //send DME call to server var vDMEInfo = portalWnd.httpRequest(s); //alert(vDMEInfo.xml); // DME Error Checking if(!vDMEInfo||vDMEInfo.status) { var msg="Error calling DME, "; msg += (vDMEInfo? "(status code): "+vDMEInfo.status: "bad server response."); alert(msg); return true; } //create an XML object to contain the DME data var vObjDMEXML = new portalWnd.DataStorage(vDMEInfo); var vRecords=vObjDMEXML.document.getElementsByTagName("RECORD"); if (vRecords.length != 0) { var vCols = vRecords[0].getElementsByTagName("COL"); var vDesc = vCols[0].firstChild.data; lawForm.setFormValue("text12",vDesc,rowNum);
} }
} return true; }