VBScript doesn't work in v9!!!

Not even the simplest script, like:

MsgBox "Test"   or

call MsgBox ("Test")   or

showSubmit false    or

call showSubmit (false)  or

or eworkShowSubmit false...... etc...

Tagged:

Comments

  • I got the following code to work, but only on a client button, not on a form load or a field exit:

     

    showSubmit false
    Call MsgBox ("test")
    showSubmit true

    But then I added more, and it stopped working:

    Dim AmtCol, ValCol, RowCount, Probability, Row, Amount

    showSubmit false
    Call MsgBox ("test")
    showSubmit true

    AmtCol = 6
    ValCol = 7

    Probability = CInt(getField("Probability", ""))
    Amount = getField("Amount", "")
    Call SetField("Value", "", Probability * Amount * 0.01);

     

    RowCount = GetRowCount("SalesGrid")
    If RowCount > 0 Then
        For Row = 0 to RowCount-1
            Amount = CCur(GetCell("SalesGrid", AmtCol, Row))
            Call SetCell("SalesGrid", ValCol, Row, CStr(Probability * Amount * 0.01));
        Next
    End If

  • I have the same situation when I convert 7.6x to V9.x all VBScript functions and procedures do not work at all. I have to rewrite them in C#.

  • Does c# have get & set field & cell?

  • If you are referring to client-side scripting, which is looks like you are based on wanting to get/set fields, then you need to use VBScript or JScript (in v7 and v9).  C# is only for server-scripting in v9.  You can migrate over (and use) existing v7 VBScript and JScript.NET to v9 server scripts, but you can only create new server scripts in C#.

  • @Ari:

     

    This is a VERY common area of confusion. Naming C# code (not script, actual code) 'script' was the worst possible naming in version 9. This confusion will be with us for many years to come IMO.

     

    It also makes new customers believe it really is script, which lends a 'Mickey Mouse' interpretation to the product. I always have to repeatedly explain that this is actual .Net code, and actual compiled .Net code, and can be debugged as such. Seems like a foot-shooting situation in the marketing area.

  •  


    Tony Tran wrote:

    I have the same situation when I convert 7.6x to V9.x all VBScript functions and procedures do not work at all. I have to rewrite them in C#.


    If you are referring to server side VBScripts, they should work, and are advertised to work. If they do not, it is a bug and should be reported.