Batch Status always Blank

In GL_CompanyActiveBatch it appears the batch status field is always blank. Trying to write a Sage Alert that filters out any batch "in use". Is it even possible? Sage 100 v2021. Thanks.

Parents
  • 0

    I second this question.  Where is the system getting the Batch Status from if not from the field in this table?

  • 0 in reply to ehx

    Batch status is determined on demand in Sage 100.  I am not certain how or if this this can be accomplished using a Sage Alert.   

     It is possible through scripting to check if a batch is available or not making use of the GL_CompanyActiveBatch_svc service object.

     

    To check if a batch is available in AP Invoice Entry.

    glCompanyActiveBatchSvcOH = o.Session.AsObject(oSession.GetObject(“GL_CompanyActiveBatch_svc”))

     

    batchMod = ”A/P” ‘ Sets the module code of the batch to check

    batchType = ”01” ‘  Sets the batch type of the batch to check

    batchNo = ”00002”  ‘ Sets the batch number of the batch to check

     

    retVal = glCompanyActiveBatchSvcOH.CanAccessBatch(batchMod,batchType,batchNo) ‘ Will return success if batch is available, failure if batch is not available.

    If retVal = 0 {

                    failureMessage = glCompanyActiveBatchSvcOH.LastErrorMsg$ ‘ Why batch was not available

    }

Reply
  • 0 in reply to ehx

    Batch status is determined on demand in Sage 100.  I am not certain how or if this this can be accomplished using a Sage Alert.   

     It is possible through scripting to check if a batch is available or not making use of the GL_CompanyActiveBatch_svc service object.

     

    To check if a batch is available in AP Invoice Entry.

    glCompanyActiveBatchSvcOH = o.Session.AsObject(oSession.GetObject(“GL_CompanyActiveBatch_svc”))

     

    batchMod = ”A/P” ‘ Sets the module code of the batch to check

    batchType = ”01” ‘  Sets the batch type of the batch to check

    batchNo = ”00002”  ‘ Sets the batch number of the batch to check

     

    retVal = glCompanyActiveBatchSvcOH.CanAccessBatch(batchMod,batchType,batchNo) ‘ Will return success if batch is available, failure if batch is not available.

    If retVal = 0 {

                    failureMessage = glCompanyActiveBatchSvcOH.LastErrorMsg$ ‘ Why batch was not available

    }

Children
No Data