12-08-2011 07:16 PM
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:
contactDetail(0) = objRS.Fields("PatronID").Value
contactDetail(1) = objRS.Fields("FirstName").Value
contactDetail(2) = objRS.Fields("LastName").Value
And they call it as
set r = a
Then I got runtime error about the object type mismatch.
Can anyone give me any suggestion?
Thanks a lot
Solved! Go to Solution.
12-09-2011 12:57 AM
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).
contactDetail(0) = objRS.Fields("PatronID").Value & ""
contactDetail(1) = objRS.Fields("FirstName").Value & ""
contactDetail(2) = objRS.Fields("LastName").Value & ""
getMyArray = contactDetail
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:
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.
12-09-2011 05:36 AM
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:
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".