- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-13-2019 09:45 AM
Hey everyone,
I would like to update a few thousand records via REST API (PUT), but I don't want the 'sys_updated_on' field to be updated. I want this field value to stay the same, and be ignored.
How can I accomplish this via REST API?
I know that I can do the following via a GlideRecord internally with:
gr.setWorkflow(false);
gr.autoSysFields(false);
But I'm uncertain as to how to best attain this via API.
I'm sure there's an answer out there.
Thanks.
Solved! Go to Solution.
- Labels:
-
Integrations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-13-2019 11:27 AM
As of now, there is no REST API sysparam to NOT update system fields.
https://developer.servicenow.com/app.do#!/rest_api_doc?v=madrid&id=r_TableAPI-GET
You will have create business rule to NOT update system fields for REST API transactions.
Regards,
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-13-2019 09:51 AM
You can write business rule on your taget table to include below method.
current.autoSysFields(false);
I assume that you are authenticating with particular using while consuming REST API.
You can add this user condition in business rule to not update system fields.
Regards,
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-13-2019 09:54 AM
Hi Sachin,
I was thinking of performing this via Business Rule, but was particularly wondering if there was a way to format the REST API parameters to not update the 'sys_updated_on' field.
Again, it may not be possible via REST
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-13-2019 11:27 AM
As of now, there is no REST API sysparam to NOT update system fields.
https://developer.servicenow.com/app.do#!/rest_api_doc?v=madrid&id=r_TableAPI-GET
You will have create business rule to NOT update system fields for REST API transactions.
Regards,
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-13-2019 11:30 AM
Thanks - will mark this as correct unless someone else can come along and figure out a way to do it purely by the REST call.
