Invalid data is updated in reference field via API call
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2025 03:46 AM
Hello Everyone,
I have found an issue in Servicenow where I need assistance for fixing it.
Issue Description : I have two new custom fields of type - Reference in Server table "cmdb_ci_server" . While I am trying to create a new Server record by using REST API explorer, I am passing some random string values such as "abc" or "xyz" (which does not exist in the reference table). The record got created and when I check for these two fields the value is empty from both list view and form view. But the thing is, When I go to check "Show XML" from the header and search for those two fields, the random values are showcasing in the XMl like "abc" (which I have passed while inserting record). It should not happen like this. Since it is a reference field my requirement is to avoid random values being captured in XML.
I have tried with the OOTB variable such as "Support Group" and "Managed by Group". I see the same issue happening with OOTB variables as well.
Please find snip attached for your reference and please assist me on how to restrict the random string values being captured in the XML. Since they are reference fields it should not happen.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2025 06:19 AM
seems a platform bug then.
It should not accept any garbage value ideally
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