SO/Invoice History Created By User?

Is anyone aware of a way to add the 'created by' user code to the SO and/or Invoice History Inquiry screens?  I found this very easy to do on the data entry screens for these, but when attempting to add the field to the history screens, the SY_User object is not available in the list of datasources.

Parents
  • 0

    I had a thread about this and a script to go with it. What I did was to create two UDFs, one for first name and one for last name. Then I attached a script to the Customer field. The script wrote out the first and last name to the UDFs. I mapped the UDFs to history and added them to the Sales Order, Invoice, Sales Order History and Invoice History panels.  

    Here is the script I used:

     

    sFirst = "" : sLast = "" : sKey= "" : sCKey = ""

    retVal = oBusObj.GetValue("UserCreatedKey", sCKey)

    Set oUser = oBusObj.AsObject(oBusObj.GetChildHandle("UserCreatedKey"))

    retVal = oUser.getvalue("UserKey$",sKey) retVal = oUser.getvalue("FirstName$",sFirst) retVal = oUser.getvalue("LastName$",sLast)

    If sKey = sCKey then  retVal = oBusObj.SetValue("UDF_FIRST$", sFirst)  retVal = oBusObj.SetValue("UDF_LAST$", sLast)

    end if

Reply
  • 0

    I had a thread about this and a script to go with it. What I did was to create two UDFs, one for first name and one for last name. Then I attached a script to the Customer field. The script wrote out the first and last name to the UDFs. I mapped the UDFs to history and added them to the Sales Order, Invoice, Sales Order History and Invoice History panels.  

    Here is the script I used:

     

    sFirst = "" : sLast = "" : sKey= "" : sCKey = ""

    retVal = oBusObj.GetValue("UserCreatedKey", sCKey)

    Set oUser = oBusObj.AsObject(oBusObj.GetChildHandle("UserCreatedKey"))

    retVal = oUser.getvalue("UserKey$",sKey) retVal = oUser.getvalue("FirstName$",sFirst) retVal = oUser.getvalue("LastName$",sLast)

    If sKey = sCKey then  retVal = oBusObj.SetValue("UDF_FIRST$", sFirst)  retVal = oBusObj.SetValue("UDF_LAST$", sLast)

    end if

Children