Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Tuesday, November 26, 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: 6.2 Equivalent of GetProperty("Name")
Brett Willis
Posts: 9
 
6.2 Equivalent of GetProperty("Name")Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Jun 06 12:22 PM

bentelan fiale 4 mg

bentelan
fiogf49gjkf0d
Switching over from 5.2 dev environment to 6.2 and wondering what the equivalent of the v5.2 GetProperty("Name") function is in v6.2? I need to know the name of the control that is calling the vbScript so that I can use a common sub instead of duplicating code.

Thanks.
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: 6.2 Equivalent of GetProperty("Name")Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Jun 06 1:24 PM
fiogf49gjkf0d
In 6.2, the events will have a sender parameter passed in. This is a reference to the control that triggered the event. So if you use the same "OnClick" handler for multiple buttons, you could use sender.Name to get the name of the control that actually fired the event.
[Reply][Quote]
Brett Willis
Posts: 9
 
Re: 6.2 Equivalent of GetProperty("Name")Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Jun 06 1:45 PM

naltrexone buy uk

buy naltrexone online canada click here

citalopram and alcohol reddit

alcohol and antidepressants citalopram go
fiogf49gjkf0d
I had to pass the original sender parameter through to the subroutine, but that worked great!

Thanks!

Sub txtDiscountExitControl(Sender)
CalcDiscount(Sender)
End Sub

Sub txtFinalPriceExitControl(Sender)
CalcDiscount(Sender)
End Sub

Sub CalcDiscount(Sender)
If Sender.Name = "txtDiscount" Then ' Calculate Final Price
txtFinalPrice.Text = vTotalPrice * (1 - vDiscount)
Else ' Calculate Discount
txtDiscount.Text = 1 - (vFinalPrice / vTotalPrice)
End If
End Sub
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: 6.2 Equivalent of GetProperty("Name")Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Jun 06 2:10 PM
fiogf49gjkf0d
You know, you can also create a generic handler sub (which takes a single parameter for sender) and then wire up all the controls to use it. This way you don't have to have a handler to just pass off to some other handler (like you show in your code)

In the property list, click over to the events, then use the drop down to just select the "CalcDiscount" sub for the txtDiscountr and txtFinalPrice controls. Then you don't need that extra step.
[Reply][Quote]
Brett Willis
Posts: 9
 
Re: 6.2 Equivalent of GetProperty("Name")Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Jun 06 2:14 PM

plavix

plavix restaurantvisuals.com
fiogf49gjkf0d
You're right! I had originally coded it with the CalcDiscount sub not having a sender and thought I had to pass through!

Thanks!
[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/26/2024 3:41:39 AM