- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2025 11:11 PM
Hi everyone, I am getting 400 Bad request while adding one more field as parameter in the request body. If I remove that specific field from the request body, the record will get inserted. That field is a custom field (is a string field) in incident table, and it is configured as read-only from dictionary.
This is the error I am getting -
{
"error": {
"message": "Error",
"detail": "Wrong parameters: 'u_variable_name'. Allowed parameters are: additional_comments,assigned_to,assignment_group,business_service,caller,category,company,cmdb_ci,description,priority,short_description,state,ticket_type,work_notes,sub_category,correlation_id,correlation_display,impact,urgency"
},
"status": "failure"
}
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2025 11:37 PM
I’m wondering how you're passing this in the API. It seems like there might be a syntax issue, or is this variable mapped in another instance?
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2025 11:38 PM
field is read-only at dictionary level -> Still you should be able to set value to it via API
what API is that? Table API or Scripted REST API
Any before insert/update business rule is stopping?
please share the field configuration screenshot here and how are you consuming that endpoint?
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
03-05-2025 11:37 PM
I’m wondering how you're passing this in the API. It seems like there might be a syntax issue, or is this variable mapped in another instance?
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2025 01:02 AM
Hi @Dr Atul G- LNG , Sorry for taking up your time. The issue was on the scripted REST API side, and I have fixed it. I appreciate your help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2025 01:06 AM
Good to know! If you think I’ve helped with troubleshooting, you can accept my answer as the solution and close the thread.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2025 11:21 PM
Hello @GopikaP ,
The attribute you are mentioning is read only? can you remove custom field read only check & then add the field value again.
If still not done,
check that any data policy or Ui policy you have added, please uncheck or remove that custom field from there.
then try trigger the api.
Let me know if this helpful to you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2025 11:38 PM
field is read-only at dictionary level -> Still you should be able to set value to it via API
what API is that? Table API or Scripted REST API
Any before insert/update business rule is stopping?
please share the field configuration screenshot here and how are you consuming that endpoint?
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