- 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:21 PM
Hi @GopikaP
This can be considered as read-only, and you're calling it at the form level via the API. Please check the syntax carefully when adding it to the API call.
Is it get or post call?
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:26 PM
Hi @Dr Atul G- LNG , it is a post call. So, is it because it is read-only?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2025 11:30 PM
Hi @GopikaP
Is any of these are read only
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"
, if no, then i think its read only issue.
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:34 PM
Hi @Dr Atul G- LNG ,Thanks for looking into this. I tried with one another custom read only field - it is not returning any error. So, I think it is not because of read-only.