Sage 100 BOI Script to Create Inventory Transactions

SOLVED

I'm writing a BOI script to create Inventory Adjustment Transactions.  I want to use the next available entry number so I have the GetNextEntryNo(refNo$) function in my script.  What I can't figure out is what the "refNo$" needs to be.  Does anyone have a listing of the valid values?  I tried "6" but that doesn't work.  It returns a "0" to my variable.  Thanks.

Parents
  • 0

    The refNo$ is actually the string that will be returned with the next entry number.  Set, your transaction type first "6"=Adjustment, and then call the GetNextEntryNo(sNextNum).  Then use that variable to set the Transaction Number.

    E

  • 0 in reply to jepritch

    Thanks for the quick response.  Still no dice.  Here's part of my code:

    If Not (IsObject(oIM)) Then
    retVal = oSS.nSetProgram(oSS.nLookupTask("IM_Transaction_ui"))
    Set oIM = oScript.NewObject("IM_Transaction_bus", oSS)
    End If

    vNextEntryNo = ""

    retVal = oIM.nSetKeyValue("EntryType$", "6")
    retVal = oIM.nGetNextEntryNo(vNextEntryNo)

    At this point vNextEntryNo still = ""

Reply
  • 0 in reply to jepritch

    Thanks for the quick response.  Still no dice.  Here's part of my code:

    If Not (IsObject(oIM)) Then
    retVal = oSS.nSetProgram(oSS.nLookupTask("IM_Transaction_ui"))
    Set oIM = oScript.NewObject("IM_Transaction_bus", oSS)
    End If

    vNextEntryNo = ""

    retVal = oIM.nSetKeyValue("EntryType$", "6")
    retVal = oIM.nGetNextEntryNo(vNextEntryNo)

    At this point vNextEntryNo still = ""

Children