Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, June 20, 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: Run code on Form B to run when triggered on Form A
Steve Knowles
Posts: 657
Top 10 forum poster: 657 posts
 
Run code on Form B to run when triggered on Form AYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 Oct 07 7:07 AM
Is it possible to run the code on a form without actually clicking on it? I have a complex calculation behind one form. I am wondering if there is a way to run this code as if someone has clicked on the tab to activate the AXFormChange event to start the chain of events on the form that performs the proper calculations from another tab.

So I have complex code behind form B. When values are changed on Form A, I want to run the code on form B, as if some had given it focus to run the code behind it. thanks
[Reply][Quote]
Lloy Sanders
Posts: 69
 
Re: Run code on Form B to run when triggered on Form AYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 Oct 07 10:05 AM
Put the code in vbscript and include it in both forms. Then you can call it whenever you want.
[Reply][Quote]
Jason Buss
Posts: 382
 
Re: Run code on Form B to run when triggered on Form AYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 Oct 07 10:25 AM
You could also create a reference to the from containing the code (it would have to be a form that is open) by looping through the active forms collection in SLX. However, this will only allow to to reference controls on that form. I'm not sure if you can use that same process to call a particular method or function. You could have a function on the click event of a button on the other form and then call that click event, but I'm not sure about returning a result from the function if you call it in that way.
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Run code on Form B to run when triggered on Form AYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 29 Oct 07 10:45 AM
I'd second what Lloy said, put it into an include script and add it to both places. That's the best route.

However, you could also load the form as a MainView, but just never call Show or ShowModal. The form would be loaded and you could access the script on the form to call whatever you want.
[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/20/2025 6:46:24 PM