Sage SalesLogix
  • Contact Us
  • Sage North America
800-643-6400
Welcome Twitter Facebook LinkedIn
Community Home Blogs Share Ideas Search Request Access Resources
Reply
Tuned Listener
yshld
Posts: 63
Registered: 11-29-2011
Accepted Solution

What VB version does SalesLogix VBScript use

Hi,

 

Just so confused for the VBScript used by SalesLogix LAN version. I am new to SalesLogix development. Could anyone tell me what VB version it is using? I try some basic VB syntax, it just cannot pass

For example I declare a String variable like Dim a as string, but the Syntax Check report error, if I remove "as string", then it is fine. Why it is like that?

 

Also can anyone give an example of function return string array? I did like this:

 

Function a()

    Dim contactDetail(3)
    contactDetail(0) = objRS.Fields("PatronID").Value
    contactDetail(1) = objRS.Fields("FirstName").Value
    contactDetail(2) = objRS.Fields("LastName").Value

End Function

 

And they call it as 

Dim r()

set r = a

 

Then I got runtime error about the object type mismatch.

 

Can anyone give me any suggestion?

 

Thanks a lot

Please use plain text.
Bronze Contributor
rchavez
Posts: 91
Registered: 06-09-2009

Re: What VB version does SalesLogix VBScript use

I believe it uses VB Script, so you won't be able to Dim a variable a Typed Variable, this is why you can't declare with "as string".

 

Second, your Function is not returning any values.

In VB, you assigned the return value to the Function name (within the function).

 

Function getMyArray()

    Dim contactDetail(3)

    contactDetail(0) = objRS.Fields("PatronID").Value & ""
    contactDetail(1) = objRS.Fields("FirstName").Value & ""
    contactDetail(2) = objRS.Fields("LastName").Value & ""

 

  getMyArray = contactDetail

End Function

 

 

Last, but not least, an array is not an object, so you shouldn't use "set" with it.

This will work with the Above function:

 

Dim myArray

 

  myArray = getMyArray()

 

As stated above, SalesLogix Windows Client uses regular VB Script, so you could use any reference material on how to program VB Script, and 99% of it will be applicable.

Raul A. Chavez
http://raul.chavez.com
http://www.crmbi.com
Please use plain text.
Gold Super Contributor
RJLedger
Posts: 2,234
Registered: 03-19-2009

Re: What VB version does SalesLogix VBScript use

Initially VBScript 5.6.

 

You need to get a copy of the Microsoft VBScript help file. it's what most of us have been using since the initial release of VBScripting in SalesLogix v6.0. If you can't find it, here's a link to a copy we keep around:

   www.rjlsystems.net/TheToolBoxX/VBScript/script56.chm

 

NOTE: You will also need a copy of the Saleslogix "LAN DEV Ref" which you can download from teh SalesLogix Support site. It has the "extensions" that the SalesLogix dev team has added to the VBScript environment.

 

Prior to that.. it was "Cypress Enable".

 

 

 

 

--
RJ Ledger - rjledger@rjlSystems.net

".. Stay Focused..."
http://www.rjlSystems.net - blog: www.rjlSystems.net/blog.html
Please use plain text.
Bronze Elite Contributor
RJSamp
Posts: 482
Registered: 03-24-2009

Re: What VB version does SalesLogix VBScript use

Prior to that.. it was "Cypress Enable".

 

I thought that it was "Cypress Depressed".....:smileyvery-happy:

RJ Samp
Please use plain text.
Tuned Listener
yshld
Posts: 63
Registered: 11-29-2011

Re: What VB version does SalesLogix VBScript use

Thanks a lot for all your help!

Please use plain text.
Bronze Elite Contributor
RJSamp
Posts: 482
Registered: 03-24-2009

Re: What VB version does SalesLogix VBScript use

[ Edited ]

Now if I could only figure out the difference between Java and JavaScript.....

 

 

RJ Samp
Please use plain text.