- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-08-2022 04:52 PM
Hi I'm trying to insert the RITM reference to a table in a workflow script, but when I use current.request_item, it doesn't seem to return anything. I've also tried to write it to a string column to see if it was an issue with the reference, but that doesn't write to the column either. Am I using the variable incorrectly?
Write code:
var options = ((current.variables.asset).toString()).split(',');
for (i = 0; i < options.length; i++) {
var acc = new GlideRecord("u_coi_privileged_access");
acc.initialize();
acc.u_request_number= current.request_item;
acc.u_start_date = current.variables.start_date;
acc.u_end_date = current.variables.end_date;
acc.u_hardware = options[i];
acc.u_user = current.variables.requested_for;
acc.insert();
}
table structure
results
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-08-2022 05:05 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-08-2022 05:05 PM
used current.sys_id