# Customized Panes for 'xxxxxxxx' Created: 2010/03/03 # PANE:Purchase Order Header Details [PANE] ADMIN ARSPENLZ 01001Purchase Order Header Details 090settings\ADMIN_VBS_ARSPEN01.XML 000000500000ARSPEN010M000 0000 00000 [VBSCRIPT] ' This script contains functions for form and field events. ' You must not modify the name of the functions. Option Explicit Function CustomizedPane_OnLoad() Dim FormProps FormProps = "
" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "" Formprops = FormProps & "
" CustomizedPane.CodeObject.FormProperties = FormProps End Function Function CustomizedPane_OnRefresh() ' Specify the variables to be used when calling the business object dim XMLOut, XMLParam, Purchaseorder, FormData CustomizedPane.CodeObject.UpdateFormValues = " " ' Populate the Customer variable with the refresh value Purchaseorder = CustomizedPane.CodeObject.RefreshValue if Purchaseorder = "" then exit function end if ' Build up the XML to be passed to the business object XMLParam = XMLParam & " " XMLParam = XMLParam & " " XMLParam = XMLParam & " " XMLParam = XMLParam & " " XMLParam = XMLParam & " " XMLParam = XMLParam & " " on error resume next ' Call the business object, supplying the XML and putting the result in to XMLOut XMLOut = CallBO("PORQRY",XMLParam,"auto") if err then exit function end if ' Switch on error handling on error goto 0 ' Define the variables required for extracting the information from the DOM. Dim XMLDoc, PONumber, Supplier, SupplierName, SupplierClass, SuppAddr1, SuppAddr2, SuppAddr3, SuppAddr4, SuppAddr5 Dim SuppPostalCode, Delname, DelAddr1, DelAddr2, DelAddr3, DelAddr4, DelAddr5, DelPostalCode, Customer, CustPONumber, CurrencyCode Dim CurrencyDesc, OrderStatus, OrderType, PayTerms, TaxStatus, ShipIns, OrderDisc, Buyer, BuyerName, DocFormat, FullOrderStatus Dim EntryDate, DueDate, MemoDate, MemoCode ' Load the output from the business object in to the DOM Set XMLDoc = createobject("MSXML2.DOMDocument") XMLDoc.async = false XMLDoc.LoadXML(XMLOut) ' Populate the values for the fields PONumber = XMLDoc.SelectSingleNode("//PurchaseOrder").Text Supplier = XMLDoc.SelectSingleNode("//Supplier").Text SupplierName = XMLDoc.SelectSingleNode("//SupplierName").Text SupplierClass = XMLDoc.SelectSingleNode("//SupplierClass").Text SuppAddr1 = XMLDoc.SelectSingleNode("//SupplierAddr1").Text SuppAddr2 = XMLDoc.SelectSingleNode("//SupplierAddr2").Text SuppAddr3 = XMLDoc.SelectSingleNode("//SupplierAddr3").Text SuppAddr4 = XMLDoc.SelectSingleNode("//SupplierAddr4").Text SuppAddr5 = XMLDoc.SelectSingleNode("//SupplierAddr5").Text SuppPostalCode = XMLDoc.SelectSingleNode("//SupPostalCode").Text Delname = XMLDoc.SelectSingleNode("//DeliveryName").Text DelAddr1 = XMLDoc.SelectSingleNode("//DeliveryAddr1").Text DelAddr2 = XMLDoc.SelectSingleNode("//DeliveryAddr2").Text DelAddr3 = XMLDoc.SelectSingleNode("//DeliveryAddr3").Text DelAddr4 = XMLDoc.SelectSingleNode("//DeliveryAddr4").Text DelAddr5 = XMLDoc.SelectSingleNode("//DeliveryAddr5").Text DelPostalCode = XMLDoc.SelectSingleNode("//PostalCode").Text Customer = XMLDoc.SelectSingleNode("//Customer").Text CustPONumber = XMLDoc.SelectSingleNode("//CustomerPoNumber").Text CurrencyCode = XMLDoc.SelectSingleNode("//Currency").Text CurrencyDesc = XMLDoc.SelectSingleNode("//Description").Text OrderStatus = XMLDoc.SelectSingleNode("//OrderStatus").Text OrderType = XMLDoc.SelectSingleNode("//OrderType").Text PayTerms = XMLDoc.SelectSingleNode("//PaymentTerms").Text TaxStatus = XMLDoc.SelectSingleNode("//TaxStatus").Text ShipIns = XMLDoc.SelectSingleNode("//ShippingInstrs").Text OrderDisc = XMLDoc.SelectSingleNode("//OrderDiscount").Text Buyer = XMLDoc.SelectSingleNode("//Buyer").Text BuyerName = XMLDoc.SelectSingleNode("//Name").Text DocFormat = XMLDoc.SelectSingleNode("//DocumentFormat").Text EntryDate = XMLDoc.SelectSingleNode("//OrderEntryDate").Text DueDate = XMLDoc.SelectSingleNode("//OrderDueDate").Text MemoDate = XMLDoc.SelectSingleNode("//MemoDate").Text MemoCode = XMLDoc.SelectSingleNode("//MemoCode").Text Select Case OrderStatus Case "0" FullOrderStatus = "0 - In process" Case "1" FullOrderStatus = "1 - Ready to print" Case "4" FullOrderStatus = "4 - Order printed" Case "9" FullOrderStatus = "9 - Complete" Case "*" FullOrderStatus = "* - Cancelled during entry" Case Else FullOrderStatus = OrderStatus End select FormData = "
" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "" FormData = FormData & "
" CustomizedPane.CodeObject.UpdateFormValues = FormData End Function Function CleanData(InString) Dim newString newString = Replace(InString, "&", "&") newString = Replace(newString, """", """) newString = Replace(newString, "'", "'") newString = Replace(newString, "<", "<") newString = Replace(newString, ">", ">") CleanData = newString End Function