1
0
-1
1 answer
- 10-1
After analyzing outgoing script from, ServiceNow incoming script has been modified and it works:
incident.cmdb_ci = nodeHelper.getReference("cmdb_ci", "name", replica."customKeys"?.CI)?.sys_id
CommentAdd your comment...
Overview
Content Tools
search
attachments
weblink
advanced
Hello Community,
I have following INC payload coming from Jira SD:
"customKeys": {
"CI": "abo20001"
},
CI record with above name ("abo20001") exists on SN side, and I would like to store it on a INC record in SN. My incoming script for it looks as below:
if (replica.customFields."customKeys"?.CI != null)
{
def remote_CI = replica.customFields."customKeys"?.CI
incident.description = remote_CI
incident.cmdb_ci = nodeHelper.getReference("cmdb_ci", "cmdb_ci", replica.customFields."customKeys"?.CI)
}
For test reason, temporary I would like to store "CI" in description and cmdb_ci fields, but none of this works.
Please suggest right solution