User field on Sales Order screen

SUGGESTED

Hi ALL,

There is a field called "User" on the Top right on the Sales Order Entry screen. Can we pass the values of that field from the BOI programming?

And Can please tell me that it stores into which table?

Please help me by giving hint to resolve this issue.

Thanks

SF

Parents
  • 0
    This is the script I use to write out the order writers name to a UDF which displays the name of the order writer. You should be able to use the same process to get what you need.

    Sub PostValidation_CustomerNo500(column,value)

    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

    I had this script running in Sage 2014 and 2018.  Now, I recently updated to 2022.1, and it does not work. 

    In BigLouie's script, sCKey has a 10 digit value, but sKey is Null.  sKey comes from the GetChildHandle call, so I worry that there is a field that was renamed or something changed in that table.  I think the table should be SY_User_SVC, but I seem incapable of finding or reading what should be called here.  The 'sFirst' is also null.  I did not pull sLast into a message box to see it, but I figure the other two values are null, that would be also. 

    Has anyone dealt with this?  Can you lead me to 1. ideally a fix to the script or 2. a way to see what the field would be called in the child handle?  

    Thank you,

    Chris

Reply
  • 0 in reply to BigLouie

    I had this script running in Sage 2014 and 2018.  Now, I recently updated to 2022.1, and it does not work. 

    In BigLouie's script, sCKey has a 10 digit value, but sKey is Null.  sKey comes from the GetChildHandle call, so I worry that there is a field that was renamed or something changed in that table.  I think the table should be SY_User_SVC, but I seem incapable of finding or reading what should be called here.  The 'sFirst' is also null.  I did not pull sLast into a message box to see it, but I figure the other two values are null, that would be also. 

    Has anyone dealt with this?  Can you lead me to 1. ideally a fix to the script or 2. a way to see what the field would be called in the child handle?  

    Thank you,

    Chris

Children