A gift from @MyronStevenson from 7 years ago. Not sure if it still works in its present form. A question for the CRM gurus in the crowd, could this this used for address validation in CRM?:????
Myron - Over the past year, I have received more assistance from this forum thatI have given back. Here are a couple ""enhancements"" I've recently done that add ""WOW"" to MAS 90/200.
The attached file shows two buttons that have been added to Customer
Maintenance. They are as follows for 4.10:
1. USPS Verify
(I can't take credit for this as it is from Slade, though updated for
4.10). Here is the VB script attached to the button.
----- Start Verify Customer Maintenance Address -------
' language VBScript
'
' form variables
' AR_Customer_ bus_AddressLine1
' AR_Customer_ bus_AddressLine2
' AR_Customer_ bus_AddressLine3
' AR_Customer_ bus_City
' AR_Customer_ bus_State
' AR_Customer_ bus_ZipCode
'
'*********** ********* ********* *********
'
' Create the IE Object
Set ie=CreateObject( ""InternetExplore r.Application"" )
'
' Set IE Properties
ie.Top=0
ie.Left=0
ie.Height=700
ie.Width=800
ie.AddressBar= false
ie.MenuBar=false
ie.ToolBar=false
'
' Build Form Data
data=""/zip4/ welcome.jsp? selection= 1"" &_
""&address1="" +AR_Customer_ bus_AddressLine1 &_
""&address2="" +AR_Customer_ bus_AddressLine2 &_
""&city=""+AR_ Customer_ bus_City &_
""&state=""+AR_ Customer_ bus_State &_
""&zip5=""+AR_ Customer_ bus_ZipCode
' Set the Navigation
ie.Navigate ""http://zip4. usps.com""+data
'
' Unhide the browser
ie.visible=True
----- End -------
Not only has this button been added to the Customer Maintenance window,
but also to Contact and Ship to windows as well. Here are those
scripts:
----- Contact Verify Start ------
'
' language VBScript
'
' form variables
' AR_CustomerContact_ bus_AddressLine1
' AR_CustomerContact_ bus_AddressLine2
' AR_CustomerContact_ bus_AddressLine3
' AR_CustomerContact_ bus_City
' AR_CustomerContact_ bus_State
' AR_CustomerContact_ bus_ZipCode
'
'*********** ********* ********* *********
'
' Create the IE Object
Set ie=CreateObject( ""InternetExplore r.Application"" )
'
' Set IE Properties
ie.Top=0
ie.Left=0
ie.Height=700
ie.Width=800
ie.AddressBar= false
ie.MenuBar=false
ie.ToolBar=false
'
' Build Form Data
data=""/zip4/ welcome.jsp? selection= 1"" &_
""&address1="" +AR_CustomerCont act_bus_AddressL ine2 &_
""&address2="" +AR_CustomerCont act_bus_AddressL ine1 &_
""&city=""+AR_ CustomerContact_ bus_City &_
""&state=""+AR_ CustomerContact_ bus_State &_
""&zip5=""+AR_ CustomerContact_ bus_ZipCode
' Set the Navigation
ie.Navigate ""http://zip4. usps.com""+data
'
' Unhide the browser
ie.visible=True
----- Contact Verify End ------
----- Ship To Start ------
' form variables
' SO_ShipToAddress_ bus_ShipToAddres s1
' SO_ShipToAddress_ bus_ShipToAddres s2
' SO_ShipToAddress_ bus_ShipToAddres s3
' SO_ShipToAddress_ bus_ShipToCity
' SO_ShipToAddress_ bus_ShipToState
' SO_ShipToAddress_ bus_ShipToZipCod e
'
'*********** ********* ********* *********
'
' Create the IE Object
Set ie=CreateObject( ""InternetExplore r.Application"" )
'
' Set IE Properties
ie.Top=0
ie.Left=0
ie.Height=700
ie.Width=800
ie.AddressBar= false
ie.MenuBar=false
ie.ToolBar=false
'
' Build Form Data
data=""/zip4/ welcome.jsp? selection= 1"" &_
""&address1="" +SO_ShipToAddres s_bus_ShipToAddr ess1 &_
""&address2="" +SO_ShipToAddres s_bus_ShipToAddr ess2 &_
""&city=""+SO_ ShipToAddress_ bus_ShipToCity &_
""&state=""+SO_ ShipToAddress_ bus_ShipToState &_
""&zip5=""+SO_ ShipToAddress_ bus_ShipToZipCod e
' Set the Navigation
ie.Navigate ""http://zip4. usps.com""+data
'
' Unhide the browser
ie.visible=True
----- Ship To End ------
BUT WAIT THERE'S MORE....
In order to make label printing faster and easier, we installed a couple
of Dymo (Turbo 400) label printers. After installing the software for
these printers, you can use VB Script to print labels. These printers
also can be shared as network printers. The Mail Label button prints a
label for the address shown on the screen. It is quick and easy for
Customer Service to print labels. Here are the instructions and script.
1. Create the folder Dymo in ...\MAS90\CM\ Script.
2. Copy the attached Dymo label layout file (LWL) to the Dymo folder
created above.
3. Add the following script to a button in Customer Maintenance and
added the required fields to pass to the script.
4. Change the path in the script to the actual path to the label file.
---- Start script ------
' language VBScript
'
' form variables
' AR_Customer_ bus_CustomerName
' AR_Customer_ bus_AddressLine1
' AR_Customer_ bus_AddressLine2
' AR_Customer_ bus_City
' AR_Customer_ bus_State
' AR_Customer_ bus_ZipCode
' Declaring variables not required to VB script, but provided for
clarity
Dim strName, strAddress1, strAddress2, strAddress3, strCity, strState,
strZip, strLabel
Set DymoAddIn = CreateObject( ""DYMO.DymoAddIn"" )
Set DymoLabel = CreateObject( ""DYMO.DymoLabels "")
strMessage = ""Please Number of Labels:""
strTitle = ""Customer Maintenance - Dymo Label Printing""
strQty = Trim(UCase(InputBox (strMessage, strTitle, , 250, 250)))
'---- Check for null values and replace as necessary -----
If IsNull(AR_Customer_ bus_CustomerName ) Then strName = """" Else
strName = AR_Customer_ bus_CustomerName
If IsNull(AR_Customer_ bus_AddressLine1 ) Then strAddress1 = """" Else
strAddress1 = AR_Customer_ bus_AddressLine1
If IsNull(AR_Customer_ bus_AddressLine2 ) Then strAddress2 = """" Else
strAddress2 = AR_Customer_ bus_AddressLine2
If IsNull(AR_Customer_ bus_CIty) Then strCity = """" Else strCity =
AR_Customer_ bus_City
If IsNull(AR_Customer_ bus_State) Then strState = """" Else strState =
AR_Customer_ bus_State
If IsNull(AR_Customer_ bus_ZipCode) Then strZip = """" Else strZip =
AR_Customer_ bus_ZipCode
strLabel = strName + chr(10) + strAddress1 + chr(10) + strAddress2 +
chr(10) + chr(10) + strCity + "", "" + strState + "" "" + strZip
DymoAddIn.Open ""N:\Server\Version4 \MAS90\CM\ SCRIPT\Dymo\ Address (30252,
30320, 30572).LWL""
DymoLabel.SetAddres s 1,strLabel
DymoAddIn.Print strQty, False
---- End script ------
Well there you go. Three buttons to verify address with USPS and a
script to ""quick print"" a label on a Dymo printer. The label script has
also been added to the Contact and Ship To windows as well, so if you
want them just ask and I'll post. If there is a request, I will post
this scripts up on the group at Yahoo!.
Enjoy.
Myron Stevenson, CPA
Clearis Consulting, Inc.
Voice: 218-525-6720
Fax: 218-525-5880
Cell: 218-391-5888
email: myron@clearisconsul ting.com