Null values are not updating in Integration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2016 02:01 AM
Hii Everyone,
I am currently working on snow to snow Integration with SOAP and web services using business rules,the inserting and updating of incident is working successfully. But when I am trying to update incident with null values that was not updating in the other instance, instead the old values are remaining on the form.
Thanks,
Tony.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2016 02:38 AM
Hi Tony,
FYI:
By default, ServiceNow does not omit empty elements, elements with NULL or NIL values, from SOAP messages.
To prevent SOAP responses from containing empty elements, an administrator can create a system property called glide.soap.omit_null_values and set the value to true. This behavior is compliant with the WSDL as all elements in a SOAP message have a minOccurs=0 attribute and are therefore optional. In addition, this behavior prevents the instance from creating inefficient SOAP messages containing a large number of empty elements.
Set this property to false to allow SOAP messages to search for existing fields with empty values. For example, if an administrator wants to search for incidents with an empty Assigned to field from a SOAP message, then the SOAP message must be able to send an empty value for this field.
SOAP Web Service - ServiceNow Wiki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2023 11:57 AM
In integration from data source, in transform map you need to checked the checkbox: copy empty value, maybe in soap it is work like this.
Lili saroussi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2016 06:05 PM
Perspectium Replicator synchronizes multiple servicenow instances and databases as a native application and addresses the NULL value problem with a checkbox.
Replicator for ServiceNow — Relentless Data Synchronization - Perspectium
Cheers
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2023 12:13 PM
Hi @tonystark ,
Hope you are doing great.
we can investigate and implement a solution using business rules.
Identify the Business Rule:
- Locate the existing business rule responsible for updating incidents in the integration process. This business rule is triggered when an incident record is updated.
Modify the Business Rule:
- Within the business rule script, we need to handle the scenario where null values are provided for specific fields during an update.
- Check if the field values are null and handle them appropriately by explicitly setting the field values to null or an empty string.
please find the code below for reference:
(function executeRule(current, previous /*null when async*/) {
// Check if the incident is being updated
if (current && previous) {
// Check if the field values are null
if (current.short_description === null) {
current.short_description = ''; // Set the field value to an empty string
}
if (current.description === null) {
current.description = ''; // Set the field value to an empty string
}
// Continue updating other fields...
}
})(current, previous);
Regards,
Riya Verma