Web Services DeleteLines

SUGGESTED

Hello. I'm looking for advice on using the DeleteLines method in web services to delete sales order lines as part of an application that moves open SO lines. (It creates lines on a new or current sales order, then deletes them from the source order.)

I can get DeleteLines to delete a single line, but I can't get it do delete multiple lines at once.

         This works fine:

         Dim tLineKey(0) As String
         tLineKey(0) = "1"

         r = ws.deleteLines(cc, "ZSOH", pk, "SOH4~NBLIG", tLineKey)

         This causes a webservice error:

         Dim tLineKey(1) As String
         tLineKey(0) = "1"
         tLineKey(1) = "2"
         
         r = ws.deleteLines(cc, "ZSOH", pk, "SOH4~NBLIG", tLineKey)

The server says: ErrNum=[8] ErrLine=[0] ErrPgm=[] ErrTyp=[1] ErrMess=[ARGUMENT10(1) : Index Incorrect]
The server says: **Exception** - Class[CCommException] ErrNum=[8] ErrLine=[0] ErrPgm=[] ErrTyp=[1] ErrMess=[ARGUMENT10(1) : Index Incorrect]

 

The "Line Keys" is a string array, so I'd expect it to take more than one value at a time. Or I'm totally wrong and there's a better way to go about this.


Thanks