- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2024 09:21 PM
I am trying to get the variable value in client script, but it is not working.
i tried with below code
var x = current.variables.manager.email;
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2024 11:12 PM
Hi @MK-p
Try below code.
var gr = new GlideRecord('sc_req_item');
gr.addQuery('request_item', current.sys_id);
gr.query();
if(gr.next()) {
x = gr.variables.manager.email;
}
-------------------------------------------------------------------------
If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.
Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay
-------------------------------------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2024 10:51 PM
HI @MK-p ,
No need to use client scripts, just use email scripts to get variables and you can send those in email.
Please refer this useful video for this use case - https://youtu.be/jwXU9MQ8xhQ?si=3iGW3Xain7d5KGzE