The CreatorCon Call for Content is officially open! Get started here.

Is it possible to restrict wrong data insertion for all reference fields on the table?

Ksnow
Tera Contributor

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

3 REPLIES 3

Daniel Borkowi1
Mega Sage

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! 

Ankur Bawiskar
Tera Patron
Tera Patron

@Ksnow 

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.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ankur Bawiskar 

I think they're are using power shell tool and inserting/updating the values using script from their end.