- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2016 10:03 AM
On our change request form we have a new field called Change Owner. The field is required. I want the Change Owner field to be set to the Created by user by default. Is there a way to do that?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2016 10:19 AM
Kristin,
You can use either "javascript:gs.getUserID()" in the default value or dynamic default. You can manage your code better by using dynamic defaults
Thanks,
Abhinay
Please mark Helpful, Like, or Correct depending on the impact of the response

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2016 10:06 AM
Yes there is. Use a BEFORE business rule with insert checked. Something like this (Untested and adjust u_owner to the name of your owner field name as needed.)
Check "Advanced"
Script:
(function executeRule(current, previous /*null when async*/) {
current.u_owner = gs.getUserID();
})(current, previous);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2016 10:09 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2016 10:10 AM
you can use gs.getUserID() in dynamic default value..or existing option me , check OOB Opened by field dictionary in incident form..
Getting a User Object - ServiceNow Wiki
Please mark Helpful, Like, or Correct depending on the impact of the response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2016 10:12 AM
Set the "Default" value on the Dictionary Entry record for that custom field to be "javascript:gs.getUserID()". That will default the field to the user who creates the new record.
You do that by right-clicking on the field label and select "Configure Dictionary".