1. Open Lawson Design Studio and open the Lawson Form to which you want to add a button.
2. At the bottom of the screen, click Script and insert a script similar to the following, where Text1,
Text7, Text8, Text12, and Text13 are the values of the name properties that you want to capture.
function grabAllFormValues()
{
Company = lawForm.getFormValue("Text1", 0);
if (Company == '')
alert("Cannot display image without a valid company value on the
form.");
return;
}
alert("Cannot display image without a valid company value on the form.");
Vendor = lawForm.getFormValue("Text7", "0");
if (Vendor == '')
alert("Cannot display image without a valid vendor value on the
while (Vendor.charAt(0)==" ")
var VendorLength=Vendor.length;
Vendor = Vendor.slice(1,VendorLength);
PO = lawForm.getFormValue("Text8", 0);
while (PO.charAt(0)==" ")
var POLength=PO.length;
PO = PO.slice(1,POLength);
if (PO == '')
PO="NoPO";
Invoice = lawForm.getFormValue("Text12", 0);
Perceptive Software Integrate ImageNow with Lawson
Page 21 of 22
while (Invoice.charAt(0)==" ")
var InvoiceLength=Invoice.length;
Invoice = Invoice.slice(1,InvoiceLength);
if (Invoice == '')
alert("Cannot display image without a valid invoice value on the
Inv_Date = lawForm.getFormValue("Text13", "0");
function DisplayImageWeb()
grabAllFormValues();
imgAddress =
"http://lawson.imagenow.com:8100/webnow/index.jsp?action=filter";
imgAddress = imgAddress + "&folder=" + Vendor;
imgAddress = imgAddress + "&tab=" + Invoice;
imgWindow=window.open(imgAddress,"invoiceWindow","location=yes,menubar=no,res
izable=yes,scrollbars=yes,titlebar=yes,toolbar=no");
imgWindow.focus();
return true;