Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Wednesday, November 27, 2024 
 
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: Displaying a message or adding a label when an account has more than one address
SLX_Novice
Posts: 246
 
Displaying a message or adding a label when an account has more than one addressYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Mar 07 9:11 AM
fiogf49gjkf0d
Hi all.

We have accounts that have more than one address, but when you look in the account detail view, you only see one address (the Primary) and sometimes our users forget to click on the drop down button to show the other addresses that the account has.

Any ideas on how I can either have a message pop up when they go to the account telling them this account has multiple addresses, or have a label in RED appear right under the drown down box telling them that this account has multiple addresses?

Thanks in advance.
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Displaying a message or adding a label when an account has more than one addressYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Mar 07 11:12 AM
fiogf49gjkf0d
You could add a label on the screen somewhere, called lblAddressCount and use code like this:

Dim rs
Dim sql

sql = "select count(addressid) from address where entityid = '" & CurrentID & "'"
Set rs = Application.GetNewConnection.Execute(sql)
If Not rs.EOF
lblAddressCount.Caption = rs.Fields(0).Value & " addresses"
End If
rs.Close
Set rs = Nothing


Make sense?
[Reply][Quote]
SLX_Novice
Posts: 246
 
Re: Displaying a message or adding a label when an account has more than one addressYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Mar 07 11:46 AM
fiogf49gjkf0d
Where should I add that code, in the AXFormChange procedure?
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Displaying a message or adding a label when an account has more than one addressYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Mar 07 11:48 AM
fiogf49gjkf0d
Yes.
[Reply][Quote]
Mike Boysen
Posts: 53
 
Re: Displaying a message or adding a label when an account has more than one addressYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Mar 07 11:54 AM
fiogf49gjkf0d
Include the Database Support script:

lblAddressCount.Caption = GetField("count(addressid)","address","entityid = '"& CurrentID &"'")

I'm a simpleton
[Reply][Quote]
SLX_Novice
Posts: 246
 
Re: Displaying a message or adding a label when an account has more than one addressYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Mar 07 12:14 PM
fiogf49gjkf0d
Thanks Ryan!

I changed it a bit, it works great.

Dim rs
Dim sql
sql = "select count(addressid) from address where entityid = '" & CurrentID & "'"
Set rs = Application.GetNewConnection.Execute(sql)
If Not rs.EOF then

If rs.Fields(0).Value < 2 then
lblAddressCount.Caption = ""
else
lblAddressCount.Caption = "This account has multiple addresses"

End if
End If
rs.Close
Set rs = Nothing

I'm getting used to this programming!
[Reply][Quote]
Bob (RJ)Ledger
Posts: 1103
Top 10 forum poster: 1103 posts
 
Re: Displaying a message or adding a label when an account has more than one addressYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 Mar 07 6:58 AM
fiogf49gjkf0d
Quote:
Originally posted by Mike Boysen

Include the Database Support script:

lblAddressCount.Caption = GetField("count(addressid)","address","entityid = '"& CurrentID &"'")

I'm a simpleton


Good catch Mike.

Always great to use whatever is already there!
--
rjl
[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 © 2024 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): 11/27/2024 8:35:30 AM