Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Monday, July 7, 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: Multiple instances of the same MainView
Mark Hanford
Posts: 131
 
Multiple instances of the same MainViewYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Jul 09 5:57 AM
Hello all,

is it normal to have a situation where the same MainView (eg Contact Detail) is open more than once?

I have a different View that can be called from the "Insert" menu, and then looks through all open MainViews to find a CONTACT main view. The problem is that when two of them are up at the same time, it finds the first one, which may not be the one the user expected.

Basically, my "add new Contact Service" form has a WhenInsertNewContactService() function, so when it's opened it can try and find out which contact to default to.



' Scan through the open MainViews and see if there's an active Contact
Dim objMainViews
Set objMainViews = Application.MainViews
Dim i
For i = 0 To objMainViews.Count - 1
If objMainViews.Item(i).BaseTable = "CONTACT" Then
uxContact.LookupID = objMainViews.Item(i).CurrentID
uxContact.Text = GetField("NAMELF", "CONTACT", "CONTACTID='" & uxContact.LookupID & "'")
ElseIf objMainViews.Item(i).BaseTable = "SERVICE" Then
uxService.LookupID = objMainViews.Item(i).CurrentID
uxService.Text = GetField("SERVICENAME", "SERVICE", "SERVICEID='" & uxService.LookupID & "'")
End If
Next

uxContact and uxService are lookup fields on the form that point to a CONTACT and a SERVICE.

I suppose I could use application.BasicFunctions.CurrentContactID, but what's the general case for multiple instances of the same view?

Thanks,

Mark
[Reply][Quote]
Kris Halsrud
Posts: 88
 
Re: Multiple instances of the same MainViewYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Jul 09 8:54 AM
Mark, you can have multiple main views with the same base table. Inside your if basetable = "Contact" couldnt you add another criteria to look at the name of the main view plugin? That way you can be sure the main view is the one you want.
[Reply][Quote]
Mark Hanford
Posts: 131
 
Re: Multiple instances of the same MainViewYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 16 Jun 10 7:06 AM
I could, but the problem is that it's actually the same view. It's the "System:Contact Detail" view that's somehow being opened twice, instead of being reused. Not sure how to find out how it's happening, I'm guessing something is spawning a new MainView without checking for already-opened.
[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): 7/7/2025 4:22:26 PM