- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-03-2018 04:14 AM
Hi
I have setup a Client template for incidents which uses a script to populate the email client (envelope Icon) with details of the incident. I would also like to automatically populate the the 'to' field with the owner of the selected CI in the incident record. The problem is, no matter what I do I cant seem to script anything that populates the 'to' field?
I suspect the 'to' field in the email client cant be populated with scripts? and the email address must be entered directly?
Can anyone suggest a way round this? I really need the email client 'to' field to be dynamic.
Thanks
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-03-2018 06:28 AM
You can do this with an email client Template from System Policy> Email> Client Templates.
You can dot-walk to your email field through any field on the form. Example from Customer Service:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-03-2018 05:52 AM
Try entering cmdb_ci.owned_by.email into the To field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-03-2018 05:58 AM
goto email client template create new
on to field write the script javascript:gs.getUserid()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2019 10:38 AM
This does not work for me, however this does javascript:gs.getUser().email

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-03-2018 06:06 AM
Hi,
You can try cmdb_ci.owned_by if not then use below approach,
You can use javascript: script include.function name(current.cmdb_ci);
Then from your script include you can return the value of owned by person or his email id.
Thanks,
Ashutosh munot