Sage 100

 View Only
  • 1.  Hello 90minds geniuses ... I would like to know if

    Posted 08-06-2013 20:20
    Hello 90minds geniuses ... I would like to know if it is possible to create a UDF to track when a user updates a record. JobOps has a Template masterfile in BF but they did not add fields to track the date and user created or the date and user last updated. I don't need the dates tracked, and I've already created the UDF to capture the User Created, but don't know how to create a UDF to update every time someone updates the record. If this is possible can you please tell me how to set up?


  • 2.  RE: Hello 90minds geniuses ... I would like to know if

    Posted 08-07-2013 09:16
    I tested the following script in the event Table Pre-Write in BOM Header. It populates a UDF called DATE_UPDATED. It should work the same way for JO: retVal = 0 updateDate = """" updateDate = oSession.GetFormattedDate(CStr(Date)) retVal = oBusObj.SetValue(""UDF_DATE_UPDATED$"", updateDate)


  • 3.  RE: Hello 90minds geniuses ... I would like to know if

    Posted 08-07-2013 09:20
    @MichaelNottoli -- thank you for the information. Since I'm not very talented with script writing, do you have the syntax for the User updated instead of the Date Updated? If at all possible I would like to use the User Login and not the User Key. :)


  • 4.  RE: Hello 90minds geniuses ... I would like to know if

    Posted 08-07-2013 09:45
    oSession.UserCode will give you the user login


  • 5.  RE: Hello 90minds geniuses ... I would like to know if

    Posted 08-07-2013 10:16
    so your script would look something like this: retVal = 0 updateUser = """" updateUser = oSession.UserCode retVal = oBusObj.SetValue(""UDF_USER_UPDATED$"", updateUser)


  • 6.  RE: Hello 90minds geniuses ... I would like to know if

    Posted 03-07-2014 14:42
    @MichaelNottoli can you please help me a little more? You gave me the script above for updating a date UDF. What I need now is a way to update that Date Updated UDF if another UDF value is changed (in a PO header) - I only want that Date Updated UDF to get updated if a certain other UDF in the PO Header is updated. Could you help me with that syntax?


  • 7.  RE: Hello 90minds geniuses ... I would like to know if

    Posted 03-07-2014 14:53
    Put this script in the ""column post-validate"" event for the specific PO Header UDF: retVal=0 tmpDate = oSession.SystemDate retVal=oBusObj.SetValue(""UDF_DATEUPDATED$"",tmpDate)


  • 8.  RE: Hello 90minds geniuses ... I would like to know if

    Posted 03-07-2014 15:00
    I believe it is also possible to create a text log file of changes made to tables also. Though I am not the creative script wizard that I dream about becoming, this might be an option if you are wanting to track multiple fields without creating a UDF...


  • 9.  RE: Hello 90minds geniuses ... I would like to know if

    Posted 03-07-2014 15:03
    I love you @MichaelNottoli 8> Worked like a charm!