- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2022 01:26 PM - edited 10-28-2022 01:27 PM
Hi everyone,
how can I populate a user reference field with created by user of the record?
Thanks for help.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2022 03:27 AM
@JohnDF - Create the dictionary overide on the cmdb.owned_by as the field is cloned down from there. see the below screenshot.
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2022 03:27 AM
@JohnDF - Create the dictionary overide on the cmdb.owned_by as the field is cloned down from there. see the below screenshot.
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2022 07:04 AM
Hi @JohnDF,
Please follow the following steps:
1. Open dictionary table and use following filter:
table = cmdb AND column name = owned_by
2. Set the default value as javascript:gs.getUserID()