# Customized Panes for 'xxxxxxxx' Created: 2010/03/03
# PANE:Supplier Contact Info
[PANE]
ADMIN ARSPENLZ 01001Supplier Contact Info 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 = "
"
CustomizedPane.CodeObject.FormProperties = FormProps
End Function
Function CustomizedPane_OnRefresh()
' Specify the variables to be used when calling the business object
dim XMLOut, XMLParam, Supplier, FormData
CustomizedPane.CodeObject.UpdateFormValues = " "
' Populate the Supplier variable with the refresh value
Supplier = CustomizedPane.CodeObject.RefreshValue
if Supplier = "" then
exit function
end if
' Build up the XML that will be supplied 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("APSQRY",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, SupplierCode, Name, SuppClass, Contact, Telephone, Fax, FaxContact
Dim Supp1, Supp2, Supp3, Supp4, Supp5, SuppP, RemitName, Remit1, Remit2, Remit3, Remit4, Remit5, RemitP
Dim SuppType, OnHold, Bank, BankDesc, BankBranch, BankAcc, Branch, BranchDesc, Area, Terms, SuppTypeDesc
Dim Nationality, TaxReg, AddDate, CheckDate, CheckValue, CheckNum, CheckBank, CurrencyCode, CurrencyDesc
' 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
SupplierCode = XMLDoc.SelectSingleNode("//Supplier/Supplier").Text
Name = XMLDoc.SelectSingleNode("//SupplierName").Text
SuppClass = XMLDoc.SelectSingleNode("//SupplierClass").Text
Contact = XMLDoc.SelectSingleNode("//Contact").Text
Telephone = XMLDoc.SelectSingleNode("//Telephone").Text
Fax = XMLDoc.SelectSingleNode("//Fax").Text
CurrencyCode = XMLDoc.SelectSingleNode("//Currency").Text
CurrencyDesc = XMLDoc.SelectSingleNode("//TBLCUR_Description").Text
Supp1 = XMLDoc.SelectSingleNode("//SupAddr1").Text
Supp2 = XMLDoc.SelectSingleNode("//SupAddr2").Text
Supp3 = XMLDoc.SelectSingleNode("//SupAddr3").Text
Supp4 = XMLDoc.SelectSingleNode("//SupAddr4").Text
Supp5 = XMLDoc.SelectSingleNode("//SupAddr5").Text
SuppP = XMLDoc.SelectSingleNode("//SupPostalCode").Text
RemitName = XMLDoc.SelectSingleNode("//RemitName").Text
Remit1 = XMLDoc.SelectSingleNode("//RemitAddr1").Text
Remit2 = XMLDoc.SelectSingleNode("//RemitAddr2").Text
Remit3 = XMLDoc.SelectSingleNode("//RemitAddr3").Text
Remit4 = XMLDoc.SelectSingleNode("//RemitAddr4").Text
Remit5 = XMLDoc.SelectSingleNode("//RemitAddr5").Text
RemitP = XMLDoc.SelectSingleNode("//RemitPostalCode").Text
SuppType = XMLDoc.SelectSingleNode("//SupplierType").Text
OnHold = XMLDoc.SelectSingleNode("//OnHold").Text
Bank = XMLDoc.SelectSingleNode("//Bank").Text
BankDesc = XMLDoc.SelectSingleNode("//APSBNK_Description").Text
BankBranch = XMLDoc.SelectSingleNode("//BankBranch").Text
BankAcc = XMLDoc.SelectSingleNode("//BankAccount").Text
Branch = XMLDoc.SelectSingleNode("//Branch").Text
BranchDesc = XMLDoc.SelectSingleNode("//APSBRN_Description").Text
Area = XMLDoc.SelectSingleNode("//Area").Text
Terms = XMLDoc.SelectSingleNode("//TBLAPT_Description").Text
Nationality = XMLDoc.SelectSingleNode("//Nationality").Text
TaxReg = XMLDoc.SelectSingleNode("//TaxRegnNum").Text
AddDate = XMLDoc.SelectSingleNode("//DateSuppAdded").Text
CheckDate = XMLDoc.SelectSingleNode("//LastChequeDate").Text
CheckValue = XMLDoc.SelectSingleNode("//LastChequeVal").Text
CheckNum = XMLDoc.SelectSingleNode("//LastCheque").Text
CheckBank = XMLDoc.SelectSingleNode("//LastChequeBank").Text
If SuppType = "P" then
SuppTypeDesc = "Permanent"
Else
SuppTypeDesc = "Temporary"
End If
FormData = ""
CustomizedPane.CodeObject.UpdateFormValues = Replace(FormData, "&", "&")
End Function