# Customized Panes for 'IMPMENLZ' Created: 2010/04/13
# PANE:Account Search
[PANE]
ADMIN IMPMENLZ 01000Account Search 104 000000500001IMPMEN050M000 1281 00000CS SearchWindow
[VBSCRIPT]
Option Explicit
Function CustomizedPane_OnLoad()
' Notes :
'
' 1) The more columns that the business object must return, the slower it will run.
' 2) If the business object must return lots of rows it will significantly affect the performance.
' 3) Because the business object is not returning XML, the columns in this list must appear in the
' exact same sequence as the list supplied to the business object.
' 4) Columns that appear below with the Hidden option set to True will be available in the Field
' Chooser. These fields are returned by the business object but are not displayed to save time.
' 5) There are several columns that are commented out. This is to significantly reduce the time taken
' by the business object to return the data, and for the listview to display this. Because they
' appear in the code it is a simple case of removing the apostrophe that comments them out. The
' next time that this search is called these fields will be present.
' 6) When removing the apostrophe that comments out the entry, it must be done against both the column
' definition of what is to be displayed, as well as the business object.
dim ListXML
ListXML = ListXML & ""
ListXML = ListXML & ""
ListXML = ListXML & ""
ListXML = ListXML & ""
ListXML = ListXML & ""
ListXML = ListXML & ""
ListXML = ListXML & ""
ListXML = ListXML & ""
ListXML = ListXML & ""
ListXML = ListXML & ""
ListXML = ListXML & ""
ListXML = ListXML & ""
ListXML = ListXML & ""
ListXML = ListXML & ""
ListXML = ListXML & ""
ListXML = ListXML & ""
' ListXML = ListXML & ""
' ListXML = ListXML & ""
' ListXML = ListXML & ""
' ListXML = ListXML & ""
' ListXML = ListXML & ""
' ListXML = ListXML & ""
' ListXML = ListXML & ""
' ListXML = ListXML & ""
' ListXML = ListXML & ""
' ListXML = ListXML & ""
' ListXML = ListXML & ""
' ListXML = ListXML & ""
' ListXML = ListXML & ""
' ListXML = ListXML & ""
ListXML = ListXML & ""
CustomizedPane.CodeObject.ListviewProperties = ListXML
End Function
Function CustomizedPane_OnRefresh()
dim XMLOut, XMLParam
XMLParam = XMLParam & " "
XMLParam = XMLParam & " CrmAccount"
XMLParam = XMLParam & " 1"
XMLParam = XMLParam & " 999999"
XMLParam = XMLParam & " "
XMLParam = XMLParam & " Account"
XMLParam = XMLParam & " Name"
XMLParam = XMLParam & " AccountOnHold"
XMLParam = XMLParam & " AccountType"
XMLParam = XMLParam & " Salesperson"
XMLParam = XMLParam & " Branch"
XMLParam = XMLParam & " Customer"
XMLParam = XMLParam & " Supplier"
XMLParam = XMLParam & " Area"
XMLParam = XMLParam & " Telephone"
XMLParam = XMLParam & " AddTelephone"
XMLParam = XMLParam & " Email"
XMLParam = XMLParam & " Contact"
XMLParam = XMLParam & " CreditLimit"
XMLParam = XMLParam & " DateAccountAdded"
' XMLParam = XMLParam & " Currency"
' XMLParam = XMLParam & " UserField1"
' XMLParam = XMLParam & " UserField2"
' XMLParam = XMLParam & " UserField3"
' XMLParam = XMLParam & " UserField4"
' XMLParam = XMLParam & " UserField5"
' XMLParam = XMLParam & " StateCode"
' XMLParam = XMLParam & " SoldState"
' XMLParam = XMLParam & " SoldCountry"
' XMLParam = XMLParam & " SoldZip"
' XMLParam = XMLParam & " ShipState"
' XMLParam = XMLParam & " ShipCountry"
' XMLParam = XMLParam & " ShipZip"
' XMLParam = XMLParam & " SalesWarehouse"
XMLParam = XMLParam & " "
XMLParam = XMLParam & " "
XMLParam = XMLParam & CustomizedPane.CodeObject.Statement
XMLParam = XMLParam & " "
XMLParam = XMLParam & " "
on error resume next
XMLOut = CallBO("COMFND",XMLParam,"auto")
if err then
msgbox err.Description, vBCritical, "Calling Business Object"
exit function
end if
' Switch on error handling
on error goto 0
' Take the XML that has been built and populate the ListviewData variable.
CustomizedPane.CodeObject.ListviewData = XMLOut
End Function