Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
Reply
Highlighted
Tuned Listener
Posts: 67
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

Highlighted
Bronze Super Contributor
Posts: 129
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
Highlighted
Gold Super Contributor
Posts: 3,087
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 +1 603.369.3047 x101

".. Innovators in Mobility - Experts in Workflow Automation..."
http://www.rjlSystems.net - blog: www.rjlSystems.net/blog.html
Highlighted
Silver Contributor
Posts: 835
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".....Smiley Very Happy

RJ Samp
Highlighted
Tuned Listener
Posts: 67
Registered: ‎11-29-2011

Re: What VB version does SalesLogix VBScript use

Thanks a lot for all your help!

Highlighted
Silver Contributor
Posts: 835
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