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: Declared constants for colours, activity types etc
Mark Hanford
Posts: 131
 
Declared constants for colours, activity types etcYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 Feb 08 10:57 AM
I've noticed since our upgrade to 7.2 that we're getting script errors all over the place because the constants such as clWindow, clBtnFace, and atEmail, atMeeting etc are not defined. Were these previously in an included script, or is this something that looks like it came from our BP?

I can put the "Const Whatever = something" into a common include such as SLX_Common, but I was curious where this came from. I don't fancy having to find all the colour codes for example and replacing them with Application.BasicFunctions.StringToColor().

Any clues?
[Reply][Quote]
Mark Hanford
Posts: 131
 
Re: Declared constants for colours, activity types etcYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Feb 08 7:32 AM
This is odd. I've looked in our testing/training database, and that's working fine, however I cannot find any instances of "const clBtnFace" or "clBtnFace =" anywhere. Are these core-constants supplied by the SLX infrastructure? And if so, does anyone know why our production DB suddenly can't seem to recognise them?

Thanks,

M
[Reply][Quote]
Thomas Aussem
Posts: 57
 
Re: Declared constants for colours, activity types etcYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Feb 08 7:42 AM
From my point of view they aren't global constants. The "atMeeting" constant for example could be found in script "SP_SalesProcessFunctions" within the function NewActivity

clBtnFace isn't the name of a variable or a constant - it's the value for a variable, e.g:

Dim arrColor(1)
arrColor(0) = "clBtnFace"
arrColor(1) = "clWindow"
cboContactConflicts.Color = Application.BasicFunctions.StringToColor(arrColor(ShiftBool(MergeWithContact)))

All VBScript constants (that are builtin the scripting host) begins with vb, eg vbOKOnly, vbBlack...

Thomas
[Reply][Quote]
Mark Hanford
Posts: 131
 
Re: Declared constants for colours, activity types etcYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Feb 08 9:58 AM
This is what I always thought too, but the "constants" approach seems to be peppered all over my pluggins, so instead of

cboContactConflicts.Color = Application.BasicFunctions.StringToColor(arrColor(ShiftBool(MergeWithContact)))

it is just

cboContactConflicts.Color = clBtnFace

As if it was declared somewhere. And yes, the atMeeting (and another I can't recall) are declared in that script, but many of the others aren't, and yet this and others are used throughout.

Very strange, my BP has raised it with Sage, because the same scripts seem to work okay on our training database (a copy from a few months ago) and yet not in our live system.

Doubtless it's something I've buggered up somewhere, but it's hard to imagine where
[Reply][Quote]
Phil Parkin
Posts: 819
Top 10 forum poster: 819 posts
 
Re: Declared constants for colours, activity types etcYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 05 Feb 08 4:01 PM
It does seem that something, somewhere, is setting these as if they were globals.

I tried the following as a pure VBScript, outside of SLX (after referencing SLXControls):

Option Explicit
Dim cboContactConflicts
Set cboContactConflicts = CreateObject("SLXControls.ComboBox")
cboContactConflicts.Color = clBtnFace
Set cboContactConflicts = Nothing

And get the following error:
Microsoft VBScript runtime error: Variable is undefined: 'clBtnFace'

So that confirms they're not VBScript globals.

Phil
[Reply][Quote]
Kevin Ferguson
Posts: 9
 
Re: Declared constants for colours, activity types etcYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 06 Feb 08 5:08 AM
Doing a little digging with Visual Studio Object Explorer reveals that the colour constants are defined in the TxColor enumeration in SalesLogix.exe. Precisely why you're getting an issue with these constants is something I cannot work out. If SalesLogix is running, you *should* be able to access these constants!
[Reply][Quote]
Jeff Weight
Posts: 219
 
Re: Declared constants for colours, activity types etcYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 14 Apr 09 8:21 PM
Any chance you resolved this? I know this was over a year ago for you, but I'm curious. We are now upgrading from 6.2.6 to 7.5.1, and our Citrix server is having this problem, while other normal clients have no problems. We tried uninstalling and reinstalling the software, but to no avail. It appears that a couple individuals (Todd Hardin and Kevin Ferguson) have mentioned that the constants are contained directly within SalesLogix.exe, and I don't know how to get it to work correctly.

Thanks!
[Reply][Quote]
Mark Hanford
Posts: 131
 
Re: Declared constants for colours, activity types etcYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Apr 09 4:07 AM
No, we didn't get a response on it. I'm guessing they just went "he's obviously just doing something wrong, because 'it just works'".
When it happens now I just redeclare the constants I need, and forget about it. It hasn't happened often enough for me to invest much time in fixing it. Sorry.
[Reply][Quote]
Jeff Weight
Posts: 219
 
Re: Declared constants for colours, activity types etcYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Apr 09 11:31 AM
Thanks for your response - I completely understand the "it just works" sentiment. I admit I've thought that before, but I try to fight that by trying to guess at what I might be missing if something seems obvious.

Redeclaring the variables is our backup plan as well, but we found out overnight (our London office looked at this issue) that by moving to a different Citrix server, we no longer see the issue. While this helps, we have not yet diagnosed the problem. I imagine that if someone replies to this thread with a similar concern, I'll probably give a response similar to yours.
[Reply][Quote]
Dan Delisle
Posts: 38
 
Re: Declared constants for colours, activity types etcYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Apr 12 2:53 PM
fiogf49gjkf0d

We are in the process of getting SLX 7.5.0.1 deployed on virtual servers in a new data center. I have the SLX client running, but I am getting numerous script errors when attempting to look at existing tickets. Errors are either 'Variable is undefined: 'clWhite', or 'Variable is undefined: 'clBtnFace'. Looks to be the same thing that started out this thread. Has anyone found a resolution to this other than redeclaring the variables?

[Reply][Quote]
Jeff Weight
Posts: 219
 
Re: Declared constants for colours, activity types etcYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Apr 12 3:35 PM
fiogf49gjkf0d

We did eventually get rid of the error. I had to hunt around in my emails from early 2009, but I found it. Here are the steps I gave to resolve the issue on a particular machine:


A - Open up the Windows Services console, locate the one called "SalesLogix System" (or "SalesLogix System Service" - I've seen both names), and stop the service.
B - Open up the Windows Task Manager, click on the "Processes" tab, and attempt to locate "SLXSystem.exe".  If you find that process, select it and click the "End Process" button.
C - Go to "Start" -> "Run", and run the following command:
    "C:\Program Files\SalesLogix\SLXSystem.exe" /Uninstall
D - In the Windows Services console, refresh the screen and make sure the service is no longer listed.  If the service is still listed, follow steps B and C again.  If after a checking a couple of times and you still find the service, we'll need to pursue a full reinstallation.
E - I've been told it's good to reboot, but this may not be necessary.  If we continue to have trouble, we'll run this step on the second pass through.
F - Go to "Start" -> "Run", and run the following command:
    "C:\Program Files\SalesLogix\SLXSystem.exe" /Install
G - In the Windows Services console, refresh the screen and make sure the service is NOW listed and running.  If the service is still not listed, follow steps B and F again.


Another item I mentioned in my emails that week was to log into SalesLogix directly on the server first, and then allow Citrix clients to log in after that. Not sure if that applies in your situation.


Let me know if that helps...

[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: Declared constants for colours, activity types etcYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Apr 12 3:56 PM
fiogf49gjkf0d

We simply have an included script with dozens of these color contstants in them.....and use them all over the places.....


 


same thing with the ADO enumerations prior to SLX putting them into the SLX Database Support Script.


 


We've got an Data Grid helper script as well with simply tons of constants in it.....phone number widths and formats, integer widths, Account Name width, etc.


Great for building grid columns manually.

[Reply][Quote]
Dan Delisle
Posts: 38
 
Re: Declared constants for colours, activity types etcYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Apr 12 6:02 PM
fiogf49gjkf0d

Hi Jeff,


Thank you very much for help. Unfortunately it didnt fix the issue. I had success with each step as far as seeing the service get removed etc, but when i opened the client I still had the errors.


I am logging directly into SLX on the server. We dont have all of the remote folks setup yet so maybe we will get lucky and they wont experience the problem. I should have some tests back from that in a few days. If they have the issues as well then I guess we will go with the route of declaring everything.


Thanks again for replying!

[Reply][Quote]
Brian Segers
Posts: 69
 
Re: Declared constants for colours, activity types etcYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 03 Apr 12 7:19 PM
fiogf49gjkf0d

Hi Dan,


This is just from memmory of an old problem but have you made sure windows UAC is turned all the way down or off?


I seem to recall this problem in the past with Vista and Windows 7 if that is what your are running.


Best, Brian

[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 3:29:50 PM