- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2019 09:57 PM
What are the equivalent variables in email scripts?
Fields in sc_request table can be easily accessed from workflow or notification, but how to access them in email scripts?
For example:
In notification: ${sysapproval.description}, ${sysapproval.short_description}
In workflow script: current.description, current.short_description
In email script: ???, ???
They all correspond to the description or short_description column in the sc_request table. What is the equivalent of them in the email scripts?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2019 11:13 PM
Dear Mr. Harshvardhan,
Thank you for your help. The following code is working. I can read the sc_request table columns.
You are great.
Liuduan
var req = new GlideRecord("sc_request");
req.addQuery('sys_id', current.sysapproval.sys_id);
req.query();
gs.info("test 1: ");
while(req.next()) {
gs.info("test 2: " + req.short_description);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2019 11:40 PM
"and your notification is running on which table ?"
I am not sure. I thought it is running on Approval table or sc_request table.
How can I find out?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2019 11:38 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2019 11:40 PM
try now
gs.info('sys id '+ current.sys_id);
var req = new GlideRecord("sc_request");
req.get(current.sys_id);
gs.info("test 7.9.3: ");
gs.info("test 7.9.4: " + req.short_description);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2019 11:13 PM
Dear Mr. Harshvardhan,
Thank you for your help. The following code is working. I can read the sc_request table columns.
You are great.
Liuduan
var req = new GlideRecord("sc_request");
req.addQuery('sys_id', current.sysapproval.sys_id);
req.query();
gs.info("test 1: ");
while(req.next()) {
gs.info("test 2: " + req.short_description);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2019 11:43 PM
I am sorry. I need to go to bed now, because I have to get up early tomorrow.
I will reply tomorrow evening.
Thank you very much.