# Customized Panes for 'WIPPENLZ' Created: 2012/11/22
# PANE:Customer Contact Info
[PANE]
DUP WIPPENLZ 01000Customer Contact Info 090settings\DUP_VBS_WIPPEN01.XML 000000500000WIPPEN010M000 0000 00000 0
[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, Customer, FormData
CustomizedPane.CodeObject.UpdateFormValues = " "
' Populate the Customer variable with the refresh value
Customer = CustomizedPane.CodeObject.RefreshValue
if Customer = "" then
exit function
end if
' Build up the XML that will be supplied to the business object
XMLParam = XMLParam & " "
XMLParam = XMLParam & " "
XMLParam = XMLParam & " " & Customer & ""
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("ARSQRY",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, AccNumber, Name, Contact, Telephone, Extension, AddTelephone, Email, Sales, Branch
Dim Sold1, Sold2, Sold3, Sold4, Sold5, SoldP, Ship1, Ship2, Ship3, Ship4, Ship5, ShipP
' 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
AccNumber = XMLDoc.SelectSingleNode("//Customer").Text
Name = XMLDoc.SelectSingleNode("//Name").Text
Contact = XMLDoc.SelectSingleNode("//Contact").Text
Telephone = XMLDoc.SelectSingleNode("//Telephone").Text
Extension = XMLDoc.SelectSingleNode("//TelephoneExtn").Text
AddTelephone = XMLDoc.SelectSingleNode("//AddTelephone").Text
Email = XMLDoc.SelectSingleNode("//Email").Text
Sold1 = XMLDoc.SelectSingleNode("//SoldToAddr1").Text
Sold2 = XMLDoc.SelectSingleNode("//SoldToAddr2").Text
Sold3 = XMLDoc.SelectSingleNode("//SoldToAddr3").Text
Sold4 = XMLDoc.SelectSingleNode("//SoldToAddr4").Text
Sold5 = XMLDoc.SelectSingleNode("//SoldToAddr5").Text
SoldP = XMLDoc.SelectSingleNode("//SoldPostalCode").Text
Ship1 = XMLDoc.SelectSingleNode("//ShipToAddr1").Text
Ship2 = XMLDoc.SelectSingleNode("//ShipToAddr2").Text
Ship3 = XMLDoc.SelectSingleNode("//ShipToAddr3").Text
Ship4 = XMLDoc.SelectSingleNode("//ShipToAddr4").Text
Ship5 = XMLDoc.SelectSingleNode("//ShipToAddr5").Text
ShipP = XMLDoc.SelectSingleNode("//ShipPostalCode").Text
Sales = XMLDoc.SelectSingleNode("//SALSLS_Name").Text
Branch = XMLDoc.SelectSingleNode("//SALBRN_Description").Text
FormData = ""
CustomizedPane.CodeObject.UpdateFormValues = FormData
End Function
Function Cleanup(KeyField)
KeyField = Replace(KeyField, "&", "&")
Cleanup = KeyField
End Function