Adding USERID to Headers

If I want to add the USERID to Purchase and Sales Headers for v2.5, how would I accomplish this? It seemed pretty straight forward, but the current USERID would not populate, when creating the new document. Probably somthing that I am leaving out. Any ideas?

Hi Folsom, As far i know there is no USER ID in sales header and purchase header.All you need to do is add the User ID field and make it non editable,and on insert trigger write the code to assign the user id. hope this will help u Lakshmi Valluru

Actually I had tried that, but it didn’t work. I added the field and used this code (example) in the OnInsert Trigger: “Purchase Header”.“User ID” := USERID; I will try it again.

hi… you just need to say “user id” := userid in oninsert trigger of table. Lakshmi Valluru

That was it. Thank you very much. Have a great weekend!