Hi Marcos, Thanks for your comments. I did finally resolve this and thought i would share with the rest of the 90minds community. Use this logic to evaluate the status of any batch in Sage 100:
I am looking for the status of an A/P invoice batch.
set oSS = oscript.NewObject(""SY_SESSION"")
oSS = nSetProgram oss.nlookupTask(""AP_Invoice_UI)
I need to use SY_BatchManager_Bus and must know the batch type code. Use DFDM to find the batch type in ..\MAS_SYSTEM\SY_BatchManager.m4t. There is a ""BatchType$"" code associated with every type of batch in Sage 100.
Module: ""A/P""
Batch Type: ""01""
Data Entry: True/False
set oBatch = oScript.NewObject (""Sy_BatchManager_Bus"", oSS, ""A/P"", ""01"", 1)
Use ReadBatchStatus () to send a batch number. The business object will return the batch status in the variable tmpBatchStatus.
tmpBatchNo = ""00001""
tmpBatchStatus = """"
retVal = oBatch .nReadBatchStatus(tmpBatchNo, tmpBatchStatus)
tmpBatchStatus return values are:
Available
Purged
$$ - null (must be an invalid batch number)
Print/Update
In Use
Interrupted