Note
We've packed up and moved from Confluence to Discourse to bring you a better, more interactive space. Out of courtesy we didn't migrate your user account so - you will have to signup again
The Exalate team will be on holiday for the coming days - returning Jan 4
Enjoy & stay safe
I'm trying to get the current value of a field of the issue I'm going to sync to in an incoming sync in ServiceNow, because I want to compare it with the value that is coming in from the other (source) side.
I tried to use incident.assigned_to, as this is what I would use to set the new value, so I thought it might contain the old value before that. But it seems to only work in one direction.
Is there any other way I can do that?
Hi Benjamin,
It depends on the actual field type / name. For example, if you are syncing "Assignee" this should work:
Or you can receive a customField value as an example:
Kind regards,
Ariel
Thank you, Ariel, for your feedback, but maybe I wasn't clear enough.
I wanted the current value of the destination before applying the source to it and it seems like
oldValue = incident.assigned_to
doesn't do it.
The only idea that I could come up with is to use the nodeHelper.getReference function to get the current value of the destination record. Like so:
I haven't tested it yet, but I'm pretty sure that should work.
Or does anybody know a better way to get this current value of the destination?
Hi Ben,
This is good.
Kind regards,
Ariel