Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, August 23, 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: Updating a MainView everytime a user visits the MainView Window
John Chandler
Posts: 4
 
Updating a MainView everytime a user visits the MainView WindowYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 May 08 4:01 AM
I have created a new MainView which basically consists of a form with an unbound datagrid with dynamic information pulled from a few tables. I want to be able refresh the data in my unbound datagrid everytime a user see's it.

For example: A user will view my summary Main View, then go to the Account Main View, alter some fields, navigate back to my MainView and I want the Main View / Details form to refresh.

I have looked up/tried loads of different events but can't seem to find the answer.

Many Thanks in advance,

John
[Reply][Quote]
Timmus Agersea
Posts: 328
 
Re: Updating a MainView everytime a user visits the MainView WindowYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 May 08 12:27 PM
John,

I am not aware of any form or mainview events that mimic onBlur and/or onFocus. If the user uses the window menu and selects your mainview from the drop down then nothing fires that I know of. However, if they are clicking on your left navbar icon or via the view menu you could structure your code so that you call the refresh in your navigation code. I recommend that the actual refresh code exist in your form code behind, but you can call this member from the invoking script.

HTH,

Timmus
[Reply][Quote]
Timmus Agersea
Posts: 328
 
Re: Updating a MainView everytime a user visits the MainView WindowYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 May 08 12:31 PM
Here is some sample code that we wrote for our Executive Dashboard product. You will notice that if we find the existing mainview we dont call the InitializeForm member. Based on your requirements, you probably would.

option explicit

const DS_CAPTION = "Executive Dashboard"
const DS_FORMNAME = "frmExecutiveDashboard"

Sub Main
Dim mvCurrent
dim i

Dim strDashboard
Dim objOWC

On Error Resume Next

'check the mainviews collection to see if the dashboard form is already open
'NOTE - current SLX bug nulls out the mainview caption and name, so we cannot inspect
'those. We must inspect the details form name instead, which is saved as
'"frmExecutiveDashboard" in the plugin

For i = 0 to Application.MainViews.Count - 1
If (Application.MainViews.Item(i).DetailsView.Name = DS_FORMNAME) Then
If (Err.Number = 0) Then
Application.MainViews.Item(i).Caption = DS_CAPTION
Application.MainViews.Item(i).BringToFront
Exit Sub
Else
Call Err.Clear()
End If
End If
Next

' Form not found in collection - create a new instance
Set mvCurrent = Application.MainViews.Add("Dashboard:Executive Dashboard", 1, true)
mvCurrent.name = "Dashboard:Executive Dashboard"
mvCurrent.Caption = DS_CAPTION
mvCurrent.DisplayMode = 1 ' Detail
Call mvCurrent.DetailsView.Script.InitializeForm()
Call mvCurrent.Show()
Set mvCurrent = Nothing

Call ErrorCheckSLX("Executive Dashboard - Show had an error:", vbExclamation, "Dashboard:Executive Dashboard - Show")
End Sub
[Reply][Quote]
John Chandler
Posts: 4
 
Re: Updating a MainView everytime a user visits the MainView WindowYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 08 May 08 3:44 AM
Thanks Timmus,

We were trying something similar, but didn't know about the slx bug that nulls out the mainview caption.

Thanks again.
[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): 8/23/2025 6:04:50 PM