GRC Issue form Mapping from a CIM record.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I am moving data from a CIM (Continuous Monitoring) record to an Issue record, but stuck on how to map the attachment and some fields like assigned to.
Please help me with this issue, I appreciate your quick response thank you
Thanks,
Anurag Chaudhary
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a week ago - last edited a week ago
Moving Data from a Continuous Monitoring Record to an Issue Record — Attachments & Field Mapping
Happy to help point you in the right direction on this. Here are two approaches worth exploring, though I'd recommend validating the table names and field configurations on your specific instance before implementing.
Copying Attachments
ServiceNow stores attachments in the sys_attachment table, linked to their parent record via table_sys_id. The key thing many miss is that the Copy Attachment action in Flow Designer requires the source to be an sys_attachment record — not the parent CIM record itself.
Flow Designer approach:
- Look Up Records on
sys_attachmentwheretable_sys_id= your CIM record sys_id - Add a For Each loop
- Inside the loop, use the OOTB Copy Attachment action pointing to your Issue record
Script approach:
// Always insert the Issue record first before copying attachments
var issueSysId = issueGR.insert();
GlideSysAttachment.copy('your_cim_table', cimRecord.sys_id, 'sn_grc_issue', issueSysId);
Important: The target Issue record must be inserted before calling
GlideSysAttachment.copy(). Calling copy on an uninserted record will silently fail.
Mapping Reference Fields like Assigned To
For reference fields, always use getValue() to retrieve the sys_id — not .toString(), which returns the display value and will break the mapping.
issueGR.setValue('assigned_to', cimRecord.getValue('assigned_to'));
Before you implement — verify these on your instance:
- CIM table name — confirm the exact table name via
sys_db_object. Continuous Monitoring tables can vary depending on your P&CM configuration - Issue table name —
sn_grc_issueis the standard, but confirm on your instance - Assigned To field — not all CIM record types carry an
assigned_tofield natively. Check the CIM table schema first
Hope this helps get you unblocked. If this does not work, I recommend to raise a support case.