Having issue with mandatory fields
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2022 08:54 PM
I'm currently working on ServiceNow REST API to create Incidents. For that I need to get the fields that are mandatory, so that I can make them required.
I have already tried getting data from sys_dictionary table but the mandatory fields are shown "false" in "mandatory" attribute.
Can anyone help me out?
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2022 09:11 PM
Hello,
Now in ServiceNow a field can be mandatory from various places like client script and UI policy so it would not be possible to get all details of mandatory field using dictionary.
Rather I would suggest if it is a scripted rest api you can return a error if there are any mandatory fields not passed.
You can check the below post for the same:-
Please mark my answer as correct based on Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2022 09:38 PM
Hello @Saurav11 ,
I don't think scripted REST API will be of use since I am creating Incidents out of the System(not ServiceNow) .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2022 09:41 PM
Did not get you so are you using the API to create Incident from other system to ServiceNow right?
OR
Is it you are creating Incident from ServiceNow to other system
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2022 09:47 PM
I want to create Incident in ServiceNow for which I need to call the REST API from the other System