Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Sunday, February 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: Get objMainView.Caption property from application.Forms("System:XYZ")
Steve
Posts: 3
 
Get objMainView.Caption property from application.Forms("System:XYZ")Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 16 Apr 12 10:43 AM
fiogf49gjkf0d

SLX 6.2


I have a form which I launched via the code below


    Set objMainView = Application.MainViews.AddEx("System:XYZ", 0, False, 1, "", "")
                    objMainView.Caption ="Cancel ABCD"
                    objMainView.ShowModal


On  the AXFormOpen event of the XYZ, I needed to capture the value for the 'objMainView.Caption' set above. I tried using the code below ....


Set frm = application.Forms("System:Confrim Exam Seat")


If frm.Caption = "Cancel ABCD" Then


..... DO SOMETHING


End If


 but was returning 'Form' as value to me instead of "Cancel ABCD"


Please, what do I need to do to get this value ?


Many Thanks

[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Get objMainView.Caption property from application.Forms("System:XYZ")Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 16 Apr 12 11:04 AM
fiogf49gjkf0d

You are already in the form itself (by the time it is launched). The WhenShow should be used ( myString = Form.Caption) - replace "form" with the name of the TAXForm if needed.

[Reply][Quote]
Steve
Posts: 3
 
Re: Get objMainView.Caption property from application.Forms("System:XYZ")Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 17 Apr 12 4:05 AM
fiogf49gjkf0d

Thank you Mike, I was able to get it done with the code below


       If Application.MainViews(0).Caption = "My caption here" Then
                  ' do something 


       ElseIf Application.MainViews(0).Caption = "My preferred caption here" Then
                    ' do something else


       End If


My understanding of this is that the objMainView.Caption ="My Caption here"  sets the Caption for the View, not the Form. So to get the Caption for the View I needed to use  Application.MainViews(0).Caption


Cheers

[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): 2/23/2025 12:29:13 PM