- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2019 02:53 AM
I would like to populate the REPLY TO, FROM or CC on Client Email template from the value return by the Script Include.
Is there anything wrong with my script/setup? Thanks.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2019 03:19 AM
Hi cspra,
Using Script Include to dynamically populate to or from is right only.
you can check the client callable checkbox in Script Include and try , It would work.
Below code use can use to auto populate current user nad its mail id in "to" or "from".
javascript:gs.getUserDisplayName()+" <"+ gs.getUser().getEmail()+">"
for reference :
https://community.servicenow.com/community?id=community_question&sys_id=94a60365db1cdbc01dcaf3231f96192d
Please Hit correct if this gave your answer.
Regards
Sandeep

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2019 03:19 AM
Hi cspra,
Using Script Include to dynamically populate to or from is right only.
you can check the client callable checkbox in Script Include and try , It would work.
Below code use can use to auto populate current user nad its mail id in "to" or "from".
javascript:gs.getUserDisplayName()+" <"+ gs.getUser().getEmail()+">"
for reference :
https://community.servicenow.com/community?id=community_question&sys_id=94a60365db1cdbc01dcaf3231f96192d
Please Hit correct if this gave your answer.
Regards
Sandeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2019 03:44 AM
It works. Thanks.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2019 03:55 AM
welcome:) way to go !!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2019 01:25 PM
Follow-up question -
Do you see anything wrong here?
javascript: new global.pru_hsrd_poc().build(current.assignment_group);
With the above code, it doesn't return anything from Script Include. However, if the parameter is string instead of current.assignment_group, the call is working fine. I am applying this to FROM field.
Here's my Script Include
var pru_hsrd_poc = Class.create();
pru_hsrd_poc.prototype = {
initialize: function() {
},
build: function(xy) {
return xy;
}
},
type: 'pru_hsrd_poc'
};