SO Invoice Entry - Default qty ordered and shipped to 1

SUGGESTED

I want to have all SO Invoice lines default to an order quantity of 1 and a ship quantity of 1 (currently the default is zero).  This is Sage 100 2019.  I wrote the following script and attached it as a post-validation event to the Item Code column, but it returns an error 88 invalid/unknown property name every time I try it.

Here is the script:

' bws 7/24/2020

' Set Variables
OrderQty=0 : ShipQty = 0

' Set session object
Set oUI = oSession.AsObject(oSession.UI)

' Get values from current object (SO_InvoiceDetail_Bus)
retVal = oBusObj.GetValues ("QuantityOrdered", OrderQty, "QuantityShipped", ShipQty)

' Test for zero
if OrderQty = 0 and ShipQty = 0 then
    retVal = oUIObj.SetValues ("QuantityOrdered", 1, "QuantityShipped", 1)
end if

Parents
  • 0

    There      are     no      repeating     arguments in GetValues or SetValues. The syntax checker won't catch it because it doesn't validate each method's arguments.  Where would you have gotten the idea that these functions supported more than one pair of arguments?

Reply
  • 0

    There      are     no      repeating     arguments in GetValues or SetValues. The syntax checker won't catch it because it doesn't validate each method's arguments.  Where would you have gotten the idea that these functions supported more than one pair of arguments?

Children
No Data