B2B Integration between ServiceNow instances
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2019 01:31 AM
Hi,
I am currently facing an issue with the work note decoding part which is sent via REST api.
So, we have this integration established between 2 SNOW instances. We have a BR that's encoding the work note using encodeURIComponent() before sending it via REST to the other instance & encode is done to handle special characters in the work note. Similarly, we are decoding the work note at the other end so that work note doesn't appear in encoded format in the respective Incident but somehow it's not able to decode & update the work note.
Below is the BR that we are using. Please help us figure out what's going wrong & how to sort the issue?
Before Update BR on Incident table - below is the code
var rr=new GlideRecord('sys_journal_field');
rr.addQuery('element_id',current.sys_id);
rr.addQuery('element','work_notes');
rr.orderByDesc('sys_created_on');
rr.setLimit(1);
rr.query();
if(rr.next())
{
rr.value = decodeURIComponent(rr.value);
rr.update();
}
The code works fine when I run in background script but it's not working when the integration gets triggered & the work note is updated in encoded format only in the respective incident.
Quick help will be really appreciated.Thanks.
- Labels:
-
Integrations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2019 01:16 AM
Hi Bidisha Das,
Refer below links, I hope these might help you..:)
If my reply helps you at all, I’d really appreciate it if you click the Helpful button and if my reply is the answer you were looking for, it would be awesome if you could click both the Helpful and Accepted Solution buttons..:)
Thanks