Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Wednesday, June 18, 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: OnChange Event for Forms
Lou
Posts: 81
 
OnChange Event for FormsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Apr 07 4:22 PM
I'm using v6.2.6.

Has anyone had any problems with the OnChange Event for Forms with this version? My code will not run for this event. It works for the OnOpen Event, but I need it to work for OnChange. I did not have this problem with v6.2.2; we recently took Service Pack 6.
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: OnChange Event for FormsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Apr 07 5:11 PM
fiogf49gjkf0d
Is this a manage form, or a data form (ie: does it have a base table)?

OnChange doesn't fire for manage forms since they do not have data context to "change".

-Ryan
[Reply][Quote]
Lou
Posts: 81
 
Re: OnChange Event for FormsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Apr 07 7:52 AM
fiogf49gjkf0d
It's an Account data form.
[Reply][Quote]
Jeff Weight
Posts: 219
 
Re: OnChange Event for FormsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Apr 07 9:41 AM
fiogf49gjkf0d
If other forms in the system do have a working OnChange event (like the Account Details form), then the problem might lie somewhere else other than the service pack. I have had this happen to me a few times, and mostly for a couple of reasons. One of the reasons is a change of forms - after copying the contents of one plugin to another, I'd forget to actually tie my OnChange sub to the form itself - and it would take me a few debugging attempts to figure out that I had forgotten to merely attach the sub. The other times that I have seen this happen is if none of the fields on the form are attached to the database fields yet - if no data binding has actually been set up yet, the OnChange event won't fire. Other than those two instances, I'm not sure why you would be seeing this issue? Could it be either of those things?

Jeff
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: OnChange Event for FormsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Apr 07 10:27 AM
fiogf49gjkf0d
Is this a form that properly fired it's change event before the SP upgrade? Or is this a new form?

Also, are there bound fields on the form? The change event will only fire if there are fields to change. If there are no bound fields then I typically place a hidden label on the form, bound to the underlying table's ID field and hide it. This will force the change event to fire.

-Ryan
[Reply][Quote]
Lou
Posts: 81
 
Re: OnChange Event for FormsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Apr 07 10:39 AM
The solution to my problem was a combination of the things you described. I was trying to use a custom sub named "ResetForm," but the code only worked from within the default "AXFormChange" (I called "ResetForm" within this sub.) I was doing some preliminary testing, and I had not binded any fields to the database. So, I was doomed to fail from the beginning! Thanks for the insight, Jeff!
[Reply][Quote]
Lou
Posts: 81
 
Re: OnChange Event for FormsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Apr 07 10:48 AM
It's working now; it's a new form. I should know better than to initially blame stuff on our upgrade to SP6. (We get enough of that from our users!) I'm going to remember to have bound fields and to use your hidden label trick.

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 © 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): 6/18/2025 4:18:55 AM