- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2018 08:25 AM
I'd like to build a Template to allow the auto-fill of Assignment Group from the User record, using a field called 'u_main_group' (similar to using javascript: gs.getUserID()). I've used Script Includes to limit options before, but never to populate a field like that.
How would I do that? Is that even the right approach?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2018 08:36 AM
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2018 08:31 AM
Use gs.getUser() -this returns the user record instead of just the user ID.
var user = gs.getUser();
you can then populate the assignment group with:
user.u_main_group.sys_id
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2018 08:32 AM
Auto fill assignment group from caller record ?If yes then I dont think this approach will be able to target global audience. If end user in not part of any group then it will create issue.
But to accomplish what you wanted you should write script include and call it in the dictonary level of that field under reference qualifier.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2018 08:52 AM
I'm trying to populate the field when a Template is used, not by default.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2018 08:36 AM
Please mark this response as correct or helpful if it assisted you with your question.