How to populate user reference field with created by user of the record

JohnDF
Mega Sage

Hi everyone,

 

how can I populate a user reference field with created by user of the record?

 

Thanks for help.

1 ACCEPTED SOLUTION

Abhit
Tera Guru

@JohnDF  - Create the dictionary overide on the cmdb.owned_by as the field is cloned down from there. see the below screenshot.

Abhit_0-1667039166881.png

 


Solution2: You can write an onBefore insert BR on the table, condition: class: service  and just set the field value

current.field_name = gs.getUserID();


As in your case you are letting users to change the value anytime.

 

 

Abhit Kumar

 

View solution in original post

6 REPLIES 6

Mike_R
Kilo Patron
Kilo Patron

Set the default value equal to

 

Mike_R_0-1666989267677.png

 

@Mike Thanks for reply.

JohnDF_0-1666991731766.png

I cant set the default value. 

 

I tryed  a ditionary override and its working neither.

JohnDF_1-1666991886918.png

 

 

I should specified, the default value only works for future records going forward.

Did you want to update existing records?

The reference should be filled when creating the record with the created by user. But later it should be possible to change the reference with another user when I want to Update the record.