- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2019 07:12 AM
Hey everyone!
I am trying to create a dictionary entry with a default value to be assigned as the name of the user that is signed in. I found some other questions in the community with this question so i was able to get the code from there, but it is telling me this is an invalid default value. This is what I have so far:
javascript: current.u_requested_for = gs.getUserDisplayName();
I have the type for this dictionary entry as Reference and it is referring to sys_user. My column label name is Requested For, so respectively my column name is u_requested_for. Is my code wrong for this? Is this even allowed what I am trying to do? Is there a different way to go about doing this?
Thanks!
Solved! Go to Solution.
- Labels:
-
Personal Developer Instance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2019 07:15 AM
Hi Katelyn,
This should be the default value if you want to add the logged in user to a user reference field.
javascript:gs.getUserID();
-Anurag
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2019 07:15 AM
Hi Katelyn,
This should be the default value if you want to add the logged in user to a user reference field.
javascript:gs.getUserID();
-Anurag
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2019 07:18 AM
Unfortunately it still says that is an invalid default value.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2019 07:30 AM
There are many oob fields also using the same:
I just tried, and it is working for me. Are you working in global scope or any other?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2019 07:48 AM
i'm working in the global scope