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: Application.Forms
Ben
Posts: 26
 
Application.FormsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Aug 07 3:12 PM
I looked around to see if this was mentioned before and did not see it, but I apologize if it has been brought up in the past.

I've run into a problem when getting forms out of the Forms collection in that a form is in the collection multiple times. For example, I grab the account details form out of the collection, but find that the data associated with it (controls, etc) are for a previous account (not my current account). When looping through the collection, I find multiple instances of the same form.

So the array would look like {frmAcctDetail, frmContactDetail, frmBilling, frmSomeOtherTab, frmAcctDetail, frmBilling}. The first instance of frmAcctDetail references the last account visited, while the one in index 4 is the current account.

Does anyone know why this is occuring? I have worked around it for now, but I don't see anyone else mentioning this so I must be doing something wrong.

Thanks for any info.
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Application.FormsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Aug 07 3:32 PM
This is possible, when a MainView is loaded, there is a parameter that can specify whether to reuse an already open instance, or load a new one. I don't believe the OOTB stuff will load a second instance (it will always reuse the existing open MainView), but I've never checked either.
[Reply][Quote]
Ben
Posts: 26
 
Re: Application.FormsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Aug 07 2:10 PM
Gotcha, thanks Ryan.

I'm not sure where it (it being something not OOTB) would be loading these other instances. I'm still fairly new at working behind the scenes in SLX. How would one create other instances of the views via scripting? Perhaps someone before my time added code some place that is behind the extra instances.
[Reply][Quote]
Ben
Posts: 26
 
Re: Application.FormsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 17 Aug 07 2:04 PM
Hey Ryan,

I looked into the issue a little more and found that the forms are being duplicated when a new account is created. I put a simply little function on one of the account details fields so when I click it, it displays the currently loaded form names. Everything is fun, until I add a new account. At that point, all the major views, like account details, are duplicated.

Any ideas?

There is no non-OOTB code on account creation in our SLX instance that I know of.

I'm not really sure how I can proceed at this point. I use the Application.Forms a good bit in my scripts to reference data for validation and at this point, I cannot trust it once a new account has been created.

Thanks for any info you can provide.
[Reply][Quote]
Bob (RJ)Ledger
Posts: 1103
Top 10 forum poster: 1103 posts
 
Re: Application.FormsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Aug 07 8:21 AM
Quote:
Originally posted by Ryan Farley

This is possible, when a MainView is loaded, there is a parameter that can specify whether to reuse an already open instance, or load a new one. I don't believe the OOTB stuff will load a second instance (it will always reuse the existing open MainView), but I've never checked either.


Yep.. and the last time I looked the OOTB Inst Contact Account had the re-use flag set to false causing a new "load" of the mainview. I believe Doug Gangi pointed this out in the partner NG.
--
rjl
[Reply][Quote]
Ben
Posts: 26
 
Re: Application.FormsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 Aug 07 9:06 AM
What would be the best way to track down these instances of the re-use flag being set to false? What call is being used to create new instances of the views? Thanks!
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Application.FormsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 22 Aug 07 11:36 AM
If a MainView is launched using either of the following:

Application.MainViews.Add
or
Application.MainViews.AddEx

The third parameter passed to either of these, if true, will cause a new instance to be created every time, instead of reusing an already opened existing one.

So if you see something like this:

Set mv = Application.MainViews.Add("MyFamily:MyMainView", 1, true)

' OR

Set mv = Application.MainViews.Add("MyFamily:MyMainView", 1, true, 1, "XXXXX00000001", "")


Notice the 3rd param of true, this is what causes a new instance to be opened. Make sense?

-Ryan
[Reply][Quote]
Ben
Posts: 26
 
Re: Application.FormsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 23 Aug 07 1:00 PM
Cool, thanks.

Unfortunately, there are no calls to that which are either referring to one of the duplicate views, or have the re-use flag set to true. So I have no idea where the extra forms are coming from. They aren't duplicated until the app goes through the create new account process. Is that process hard coded? Or is there a way I can manually remove forms from the forms collection?

We are running SLX 6.2.6, if that helps.
[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:53:18 AM