Difference between Postman and ServiceNow when sys_id is used. Why?

Suggy
Giga Sage

On the incident form, to populate the 'Assignment group' field, if I use the Name of the group in postman/rest API explorer, it works fine and udpate will happen.

 

dell11.png

 

but the same operation will not work if I make use of Business rule like (current.assignment_group= "Test Group");

In business rule, only if I pass the sys_id then it gets updated.

 

Note - 

if I write like this (current.assigned_to = "john viva"); ---- this work.... why not for assignment group?

 

How does it actually work? Why it differs from Business rule vs Postman/REST API explorer?

8 REPLIES 8

Suggy
Giga Sage

Anyone?

reshmapatil
Tera Guru

Hi @Suggy ,

 

1. You can pass sys_id in JSON.

2. Set the display value of Assignment group in backend by using below code:

current.assignment_group.setDisplayValue('response.assignment_group');

 

Regards,

Reshma

**Please mark my answer correct or helpful based on the impact**

Hi @reshmapatil 


current.assigned_to =  "Demo User"; -----> works

current.assignment_group = "Demo Group"; ------> does not work... WHY?

 

Suggy
Giga Sage

ANYONE?