- 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
Since it is a Reference field
can you try
javascript:gs.getUserID();
Vinod Kumar Kachineni
Community Rising Star 2022
- 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.