Error using SYS ID for "requested for" while creating INC with OOB endpoint method

Arjit Gourav
Tera Contributor

While trying to create a ticket through a record producer using an API, it's throwing error for some particular sys ID 

The end point is as below:

POST:  /sn_sc/servicecatalog/items/{sys_id}/submit_producer

The sys ID is present and user being active, and the call is getting successful with using USER ID for the user profiles in the "requested for" field. 

But while using the SYS IDs, it's throwing the error as below

        "sys_id""-1",
        "number"null,
        "record""api/now/table/incident/-1",
 
Does anyone have any suggestion for the troubleshooting path to follow for this?
1 ACCEPTED SOLUTION

@Arjit Gourav were you able to get this fixed?


Raghav
MVP 2023

View solution in original post

11 REPLIES 11

@Arjit Gourav 

any ref qualifier added on that other variable? share screenshots of variable configurations for both

are you able to select the same user when you manually fill the record producer?

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

RaghavSh
Kilo Patron

{sys_id} should take record producer sys_id, what exactly are you passing?


Raghav
MVP 2023

Hi @RaghavSh , 

 

POST:  /sn_sc/servicecatalog/items/{sys_id}/submit_producer . Here we are using sys id of the record producer only.

But in the body for the "requested_for" field, getting some failure when using sys ids of some user profile.

 

 

ok, do your requested_for variable have any reference qualifier? if yes can you check if the sys_id you are using satisfies that criteria?


Raghav
MVP 2023

Yes @RaghavSh , I have already checked for reference qual conditions and the sys_id I am using satisfies the criteria