Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Monday, August 18, 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: legacy globals?
Robert Leet
Posts: 14
 
legacy globals?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Feb 08 9:08 AM
I am converting a lagacy form (basic) to an active form(VBScript). There are sevral cases where there is a referance to an object that I dont see as defined. For example here is the Open event. I see no definition of btnCommit. The lagacy is commented out above the VBScript.

Sub AXFormOpen(Sender)
'Application.BasicFunctions.DoInvoke "Basic", "Personal:IsManager"
'sub main
'
'SelectStatement = "Select ISMANAGER from USERSECURITY where USERID = " & "'" & CurrentUserID & "'"
'
'Hand = DBOpenSQL(SelectStatement,True)
'IsManager = DBGetValue(Hand,"ISMANAGER")
'
'If IsManager <> "T" then
' SetPropertyOf "btnCommit","Enabled", "False"
'Else
' SetPropertyOf "btnCommit","Enabled", "True"
'End if
'
'end sub

Dim slxCN
Dim slxRS
Dim IsManager

Set slxCN = Application.GetNewConnection

Set slxRS = slxCN.Execute("Select ISMANAGER from USERSECURITY where USERID = " & "'" & Application.BasicFunctions.CurrentUserID & "'")

IsManager = slxRS.Fields("ISMANAGER").Value

slxRS.Close

If IsManager <> "T" then
btnCommit.Enabled = False '???
Else
btnCommit.Enabled = False
End if


End Sub
-------------------------------------------

I have DevLogix7 and am currently half way through the book. Thanks in advance.
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: legacy globals?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Feb 08 9:20 AM
"btnCommit" will be the name of a control on the legacy form that this script is launched from. Is this what you're looking for or an I misunderstanding the question?
[Reply][Quote]
Robert Leet
Posts: 14
 
Re: legacy globals?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Feb 08 1:21 PM
I cant find anythig named that on the lagacy form. There are several controlls on the lagacy form but none of them have that name and the lagacy form works with no errors in the slx5 environment. Another instance of this on the same form looks like this.

Original_Percent=cdbl(GetPropertyOf("OriginalCloseProbability","Text"))
OriginalColseProbability does not exist on the lagacy form.

I am wondering if in the lagacy code you did not have to fully qualify the path to other forms that are open but now you have to use the full path. ex Parent.form.control ?

Even if that is the case I dont see these names anywhere.
[Reply][Quote]
Matt Dockins
Posts: 159
 
Re: legacy globals?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Feb 08 11:30 PM
If you are dealing with a custom form, check behind other controls on the form for the controls that you believe are missing. Some business partners I've dealt with in the past like to hide their controls that a user never actually touches behind other controls or in a panel - which is then shrunk to approximately a 2x2 pixel size. You might look for something like pnlHidden.

you could also put a msgbox in the code (no debugging on the legacy stuff unfortunately) and see if the variable Original_Percent actually is getting initialized - it may be something that was deprecated from an earlier design or something.

You did not have to fully qualify the control path in legacy stuff, but I'm fairly certain that the code only "knows" the controls of the form it was called from.
[Reply][Quote]
Robert Leet
Posts: 14
 
Re: legacy globals?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 08 Feb 08 9:02 AM
I checked all the items on the form with the properties dropdown and did not see this. This event is triggered by a picklist. Is it possable these are properites of a picklist that would now be accessed by sender.xxx? I will research how to cast and access the sender properties. Thanks for the input.
[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/18/2025 5:12:28 PM