Is it possible to restrict wrong data insertion for all reference fields on the table?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2023 10:48 PM
Hello, @Amit Gujarathi @shloke04 @Ankur Bawiskar
How to restrict the wrong data insertion/update for reference fields via coming from API.
Example: Wrong sys_id is passing into the reference field restrict and show alert as "provided sys_id is invalid"
We have a situation where data inserted incorrectly and it stored as foreign key and value is not being displayed on the form and in list showing weird ID with special character
[9031dfba54f6f958af9d6b10f023af4
Please help with your suggestions.
Thanks alot

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2023 10:55 PM
Hi @Ksnow , I don't think that's possible with the OOTB Rest APIs like Table API. If you want to evaluate the data and to provide meaningful error messages, you need to create your own Scripted Rest APIs, https://developer.servicenow.com/dev.do#!/learn/learning-plans/utah/servicenow_application_developer....
Greets
Daniel
Please mark reply as Helpful/Correct, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2023 11:07 PM
3rd party is using which API? Is it table API or import set API or scripted rest api endpoint?
Based on that you can handle in Import set and Scripted REST API but not in table API
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2023 08:17 PM
I think they're are using power shell tool and inserting/updating the values using script from their end.