Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2024 02:37 AM - edited 05-26-2024 02:38 AM
Hi @Jake Adams ,
Please try the below code in onAfter transform script:
(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {
var gr = new GlideRecord('table_name'); //table_name is my custom table name
gr.addEncodedQuery("cmdb_ci.operational_status = 1");
gr.query();
while (gr.next()) {
var taskCR = new GlideRecord('task_ci');
taskCR.initialize();
taskCR.task = target.sys_id;
taskCR.ci_item = gr.u_configuration_item;
taskCR.insert();
}
})(source, map, log, target);
Please mark this response as correct or helpful if it assisted you with your question.
----------------------------------------------------------------
Mark this as Helpful / Accept the Solution if this helps.
Mark this as Helpful / Accept the Solution if this helps.