Vendor Electronic Payment Table Audit

We need to track all additions/changes/deletions in the AP_VendorElectronicPayment table. Has anyone used scripts to track the changes successfully? We are using Sage 100 Premium. I have not used scripting in Sage, but I believe this could be a solution.

If anyone has information on how to handle in SQL, that will work as well.

Parents
  • 0

    Pre-write & pre-delete script on the table should do it.  Get all the details you want into a text string then write to the Activity Log.

    oSession.WriteLog "M", "New / changed / deleted AP_VendorElectronicPayment data... " & sTheDetailsYouWantToLog

    You could write to a UDT too, but with the Activity Log, there are no extra permissions required.

  • 0 in reply to Kevin M

    Once I add a field to the script (e.g., oSession.WriteLog "M", "New / changed / deleted AP_VendorElectronicPayment data... " & getvalue("APDivisionNo$"), I receive Error 88 when I try to modify data in Electronic Payment. 

    Not sure what I am doing.

  • 0 in reply to IBPIT

    Don't do it that way.  Construct your string value before the WriteLog command.  (This is from a button script I have, but it shows the concept...).

    retVal = 0 : sMsg = ""
    sMsg = "StartProgram: " & oSession.StartProgram & vbCrlf
    sMsg = sMsg & "oScript.GetCurrentProcedure() : " & oScript.GetCurrentProcedure()  & vbCrlf
    sMsg = sMsg & "CompanyCode: " & oSession.CompanyCode & vbCrlf
    sMsg = sMsg & "ModuleCode: " & oSession.ModuleCode & vbCrlf
    sMsg = sMsg & "Value: " & cStr(Value) & vbCrlf
    sMsg = sMsg & "Column: " & Column

    This is the syntax for GetValue:

    retVal = oBusObj.GetValue("StringFieldName$", sVariableName)

    retVal = oBusObj.GetValue("NumericFieldName", nVariableName)

  • 0 in reply to Kevin M

    Ahh...

    Thanks.

Reply Children