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

  • 0 in reply to BigLouie

    Thanks for the reply.  I'm actually planning on doing the following:

    1.  Create First/Last Name UDFs in SO Header.

    2.  Set the datasource for these UDFs (in UDF maintenance) to the SY_User Object's First/Last Name.

    3.  Create additional UDFs in SO Invoice Header and set the datasource to the above UDFs.

    I'm hoping this works.

  • 0 in reply to Justin K

    Item #2 will NOT work, this is why I had to use a script to write it out. Hey I gave you the script. When your method fails, use the script.

  • 0 in reply to BigLouie

    Just out of curiosity, shouldn't 'GetChildHandle' return a handle to the service object of the child object with the appropriate record already pre-loaded?

  • 0 in reply to Justin K

    If it works does it matter.

  • 0 in reply to BigLouie

    As I'm sure is the case with you BigLouie, I'm constantly trying to better my understanding of the system and it's functionality.  I'm sorry if I took this post one question too far - I can only assume that you don't know the answer to this question, as the appropriate answer couldn't have taken longer to type than your above response.  As always, I thank you for commanding the softest touch with your replies.

Reply
  • 0 in reply to BigLouie

    As I'm sure is the case with you BigLouie, I'm constantly trying to better my understanding of the system and it's functionality.  I'm sorry if I took this post one question too far - I can only assume that you don't know the answer to this question, as the appropriate answer couldn't have taken longer to type than your above response.  As always, I thank you for commanding the softest touch with your replies.

Children
  • 0 in reply to Justin K

    Someone I know at Sage suggest I use the GetChildHandle to get the service object which is why I did it as I did. With code I am aware that there maybe other ways to do it. As long as yours works that there are other ways is not really that important on something so small as writing to a UDF.