Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Thursday, August 28, 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: VB Script Class object: 1 per SLX Script?
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
VB Script Class object: 1 per SLX Script?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 16 Mar 09 2:27 PM
Can you have more than one class per script?

Class A
Private m_A
END Class
Class B
Private m_A
END Class

I've got all of the Gets and Lets in their as well.....using MyGeneration to come up with the Classes......

but am getting Redefines errors and that sort of thing.....


Thanks.
[Reply][Quote]
Stainless Steel Snake
Posts: 32
 
Re: VB Script Class object: 1 per SLX Script?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 17 Mar 09 2:52 AM
Yes, you can have any number of classes in script.
Make sure you don't have classes with the same names in your script and all included scripts.
[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: VB Script Class object: 1 per SLX Script?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 17 Mar 09 8:44 AM
Double Posting.
[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: VB Script Class object: 1 per SLX Script?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 17 Mar 09 8:44 AM
Thanks, that kind of defeats the purpose of having ClasseS...using MyGeneration to create a class, etc. that's probably why without inheritance, reflectance, etc. VB Script classes aren't used so often.....

So if I want to use ClasseS, then I need to affix table abbreviations to Lets, Gets, et al

Can't have Activity.ADD, it has to be objActivity.AddActivity

m_accountID becomes mg_accountid (g for global)

objContact.ContAccountID = gAccountID

So I'm thinking of using MyGeneration to add, say '###' to column names where needed...and replace '###' with Cont, Contr, Addr, Acct, Oppty, OppP, et al......PRN.





[Reply][Quote]
Doug Miller
Posts: 20
 
Re: VB Script Class object: 1 per SLX Script?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Mar 09 7:57 AM
You can certainly have multiple classes with the same property/method names. What you can not have is 2 classes with the same name.

this is fine (sorry about the formatting.. don't know if this forum has code tags)
---------------------------------


Sub Button2Click(Sender)
dim a
dim b

set a = new ClassA
set b = new ClassB

a.A = "This is class A"
b.A = "This is class B"

a.show
b.show

End Sub
class ClassA
private varA

public property let A (v)
varA = v
end property
public property get A
A = varA
end property

public sub Show
call msgbox("VarA = " & varA)
end sub
end class
class ClassB
private varA

public property let A (v)
varA = v
end property
public property get A
A = varA
end property

public sub Show
call msgbox("VarA = " & varA)
end sub
end class
---------------------------------
[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: VB Script Class object: 1 per SLX Script?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Mar 09 8:30 AM
Well that's what I tried, and it failed....guess I'll try again.

Thanks!
[Reply][Quote]
Phil Parkin
Posts: 819
Top 10 forum poster: 819 posts
 
Re: VB Script Class object: 1 per SLX Script?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Mar 09 11:54 PM
Quote:
Originally posted by Doug Miller

.. don't know if this forum has code tags
---------------------------------


Code tags - use [PRE] and [/PRE], but in angled brackets.
[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: VB Script Class object: 1 per SLX Script?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Mar 09 10:59 AM
Doug, I keep getting Name Redefined errors....

Class A
Private m_userid
END Class
Class B
Private M_userid
End Class
[Reply][Quote]
RJ Samp
Posts: 973
Top 10 forum poster: 973 posts
 
Re: VB Script Class object: 1 per SLX Script?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Mar 09 10:59 AM
double post
[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/28/2025 4:08:42 PM