- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-08-2017 06:47 AM
I have a POST function that works on every field I've tried except for choosing a user from user reference field.
The body is:
{"name":"Chris Test","memory":"32","managed_by":"xxx4fxc30a0a3c53217xxxxeb21742c5"}
It will create a new record and populate the new fields in the body except for managed_by. I tried sys_id based on the REST API Explorer, and it worked with my admin account internally, worked with admin account externally, but not with the system user I created. I added full admin rights to the system user to see, and that still didn't work.
Any ideas of why this isn't working?
Thanks!
Solved! Go to Solution.
- Labels:
-
Integrations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-21-2017 05:48 AM
So... I ended up having to put an ACL on a seemingly unrelated field. And, I had to clear out the session cookies in Postman, then the managed_by started returning. Very odd it was just an issue on this one field, but solved.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-08-2017 07:49 AM
Hi Chris,
So you want to insert a record in the table and want to populate user with that sys_id in that field.
What error you are getting?
Is the record getting created with empty user i.e. empty managed_by
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-08-2017 07:57 AM
Correct, on all accounts. Record is created, fields populated as they should be, except for Managed by remains blank:
I've tried sys_id and userID as well. Neither work. I'd prefer to use userID, but API Explorer builds using sys_id since it's a reference field to user table.
Best,
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-08-2017 10:08 AM
Hi Chris,
The system which is consuming the servicenow endpoint how they will know the sys_id of the record?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-08-2017 10:15 AM