Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Thursday, August 28, 2025 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Architect Forums - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: URL Web Link for Address
Tom
Posts: 58
 
URL Web Link for AddressYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Mar 09 12:42 PM
On the main Account screen SalesLogix created a URL Link so when you click on the address 1 field it opens up mapquest and plots that specific location.

I want to do the same thing but have it open a Realestate page Zillow.com and show plot that address.

Doesn anyone know how SalesLogix does this plotting?
[Reply][Quote]
Phil Parkin
Posts: 819
Top 10 forum poster: 819 posts
 
Re: URL Web Link for AddressYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Mar 09 7:32 PM
When the button is clicked, the CallMapQuest function in the SLX Address Common script is called - just have a look at the code there and you will see how it was done.

Phil
[Reply][Quote]
Tom
Posts: 58
 
Re: URL Web Link for AddressYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Mar 09 11:13 AM
I got to the script but I'm unsure how to code it so that it automatically populates the current contacts address. Any Ideas?

Or has anyone else out there in the realestate biz done this?

This is the url that mapquest points to: http://www.mapquest.com/cgi-bin/ia_free?height=300@width=500

How do I find out what Zillow will accept?
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: URL Web Link for AddressYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Mar 09 11:47 AM
Quote:
Originally posted by Tom

How do I find out what Zillow will accept?


Go to Zillow, do a search, look at the URL.

A Zillow URL will look like this: http://www.zillow.com/homes/map/2324-University-Ave-West-Saint-Paul-MN-55114_rb/

So, basically, just grab all the address fields, create a string with the values all separated by a hyphen, then add "http://www.zillow.com/homes/map/" in front of it and "_rb/" at the end.

Make sense?
[Reply][Quote]
Tom
Posts: 58
 
Re: URL Web Link for AddressYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Mar 09 11:59 AM
Thanks, but how do I get Zillow to use the address for whatever Contact I'm on?
How is the address passed from SalesLogix to Zillow? I don't want to have a static address but rather dynamic one. Am I making sense?


[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: URL Web Link for AddressYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Mar 09 12:04 PM
Quote:
Originally posted by Tom

Thanks, but how do I get Zillow to use the address for whatever Contact I'm on?
How is the address passed from SalesLogix to Zillow? I don't want to have a static address but rather dynamic one. Am I making sense?


That is your job . You write the code that gets the contact address. Then you construct a string that forms the URL (re-read my last reply). Then you launch it in the browser. Does that make sense?
[Reply][Quote]
Tom
Posts: 58
 
Re: URL Web Link for AddressYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Mar 09 12:30 PM
Do you mean write a code like SalesLogix did below? I'm not a programmer so I basically copied theirs and am trying to modify the url piece to accept it for Zillow. I got it to launch the website but it won't dynamically place the Contact address in and plot the location.

Sub CallZillow(ContactID, Description)
Const adrAddress = 1
Const adrCity = 2
Const adrState = 3
Const adrPostalCode = 4
Const adrCountry = 5
Const adrMax = 5

Dim strFields, strWhere
Dim strAddress()
Dim strNameValue(5)
Dim strURL
Dim i

If ErrorCheck (Application.Translator.Localize("Error accessing address caption:")) > 0 Then Exit Sub

strNameValue(adrAddress) = "streetaddress=" 'DNL
strNameValue(adrCity) = "city=" 'DNL
strNameValue(adrState) = "state=" 'DNL
strNameValue(adrPostalCode) = "zip=" 'DNL
strNameValue(adrCountry) = "country=" 'DNL


strURL = "http://www.zillow.com/homes/map/2324-University-Ave-West-Saint-Paul-MN-55114_rb/



strFields = "A1.ADDRESS1, A1.CITY, A1.STATE, A1.POSTALCODE, A1.COUNTRY" 'DNL
strWhere = "A1.ENTITYID = '" & ContactID & "' AND DESCRIPTION " 'DNL

If Description = "" Then
strWhere = strWhere & "IS NULL" 'DNL
Else
strWhere = strWhere & " = '" & Description & "'" 'DNL
End If

If GetFields(strFields, "ADDRESS A1", strWhere, strAddress) Then 'DNL
For i = 1 To adrMax
strURL = strURL & "&" & strNameValue(i) & strAddress(i)
Next
Application.BasicFunctions.WebOpen(strURL)
ErrorCheck Application.Translator.Localize("Error opening web browser:")
End If
End Sub
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: URL Web Link for AddressYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Mar 09 12:49 PM
Add this code - this isn't tested or anything, so might be errors, also it doesn't do any error checking to see if the address fields are blank:

Sub CallZillow(ByVal ContactID)
Dim rs
Dim url

Set rs = Application.GetNewConnection.Execute("SELECT ADDRESS1, CITY, STATE, POSTALCODE FROM ADDRESS WHERE ENTITYID = '" & ContactID & "' AND ISPRIMARY = 'T'")
If rs.RecordCount > 0 Then
url = "http://www.zillow.com/homes/map/"
url = url & rs.Fields("ADDRESS1").Value & "-"
url = url & rs.Fields("CITY").Value & "-"
url = url & rs.Fields("STATE").Value & "-"
url = url & rs.Fields("POSTALCODE").Value
url = url & "_rb/"

Application.BasicFunctions.WebOpen url
Else
MsgBox "Could not get the primary address for the contact."
End If

rs.Close
Set rs = Nothing
End Sub


Then to use it you would just pass the current ContactID to CallZillow. Does that make sense?
[Reply][Quote]
Tom
Posts: 58
 
Re: URL Web Link for AddressYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Mar 09 1:50 PM
It was throwing up a error based on your first line "Sub CallZillow(ByVal ContactID)" S/B Sub CallZillow(ContactID, Description)

I was able to fix it and now it works!

I really appreciate the assistance, I know you're not in the biz of giving away free stuff but because I'm not a programmer I would never
had gotten this without your help. I think this might be a good one keep in case any other realestate customers might want to use this too.

Thanks again as always!
[Reply][Quote]
Phil Parkin
Posts: 819
Top 10 forum poster: 819 posts
 
Re: URL Web Link for AddressYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Mar 09 6:47 PM
Glad that you made it work - Ryan has really helped you out with this one!

As 'Description' does not appear in the code for the subroutine, it should not be necessary to include it as one of the arguments. If you post the final code that you have, I will check it for you if you would like.

Phil
[Reply][Quote]
Paul Roussell
Posts: 21
 
Re: URL Web Link for AddressYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Mar 09 12:37 AM
If you replace the following function in the “System:SLX Address Common” VBScript plugin it should give you a better map button … at least in my opinion.

Sub CallMapQuest(ContactID, Description)
Const adrAddress = 1
Const adrCity = 2
Const adrState = 3
Const adrPostalCode = 4
Const adrCountry = 5
Const adrMax = 5

Dim strFields, strWhere
Dim strAddress()
Dim strNameValue(5)
Dim strTmpURL
Dim strURL
Dim i

If ErrorCheck (Application.Translator.Localize("Error accessing address caption:")) > 0 Then Exit Sub

strNameValue(adrAddress) = "streetaddress=" 'DNL
strNameValue(adrCity) = "city=" 'DNL
strNameValue(adrState) = "state=" 'DNL
strNameValue(adrPostalCode) = "zip=" 'DNL
strNameValue(adrCountry) = "country=" 'DNL

'strURL = "http://www.mapquest.com/cgi-bin/ia_free?height=300@width=500" 'DNL

'strFields = "A1.ADDRESS1, A1.CITY, A1.STATE, A1.POSTALCODE, A1.COUNTRY" 'DNL
strFields = "A1.ADDRESS1, A1.ADDRESS2, A1.ADDRESS3, A1.CITY, A1.STATE" 'DNL
strWhere = "A1.ENTITYID = '" & ContactID & "' AND DESCRIPTION " 'DNL

If Description = "" Then
strWhere = strWhere & "IS NULL" 'DNL
Else
strWhere = strWhere & " = '" & Description & "'" 'DNL
End If

If GetFields(strFields, "ADDRESS A1", strWhere, strAddress) Then 'DNL
For i = 1 To adrMax
If Trim(strAddress(i)) <> "" Then
If strTmpURL = "" Then
strTmpURL = Replace(strAddress(i), " ", "+")
Else
strTmpURL = strTmpURL & "+" & Replace(strAddress(i), " ", "+")
End If
End If
Next
strURL = "http://maps.google.com.au/?ie=UTF8&hl=en&q=" 'DNL
strURL = strURL & strTmpURL & "&f=q&om=1&iwloc=addr&z=17"
Application.BasicFunctions.WebOpen(strURL)
ErrorCheck Application.Translator.Localize("Error opening web browser:")
End If
End Sub

[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 8/28/2025 7:40:20 AM