Incident creation from one instance in other instance through UI action

Navyaa
Tera Expert

Hi All,

Can anyone provide step by step information, how to create as Incident from one instance in other instance through UI action.

Please help.

1 ACCEPTED SOLUTION

Sudhanshu Talw1
Tera Guru

Hi Navya,

Step1:Create a POST Rest Message which will create an incident from instance A on instance B.

Step2: Create an UI action call the REST message via this UI action script. for simplicity we have a option for each rest message "view Script Usage". You will get the code to call the REST message.Paste into the UI action.

 

For step 1, I have added an attachment.

For Step2, Create an UI action that will call the script message in the UI action script. 

Thanks

Sudhanshu

View solution in original post

11 REPLIES 11

Ashutosh Munot1
Kilo Patron
Kilo Patron

Hi,

1) You need REST API

2) you need user from other instance with itil access.

3) you need to create UI action and call the script include and that script include should call the REST API to create incident.

 

See this:

https://www.youtube.com/watch?v=nJntVpVYpqs

https://community.servicenow.com/community?id=community_question&sys_id=7de6e853dbcf93085129a851ca96...

https://www.youtube.com/watch?v=4hBpkX5XJcA

https://www.youtube.com/watch?v=WNECVZH3NGE

https://community.servicenow.com/community?id=community_question&sys_id=1fdd7bd1db71eb405d782183ca96...

Thanks,
Ashutosh

Sudhanshu Talw1
Tera Guru

Hi Navya,

Step1:Create a POST Rest Message which will create an incident from instance A on instance B.

Step2: Create an UI action call the REST message via this UI action script. for simplicity we have a option for each rest message "view Script Usage". You will get the code to call the REST message.Paste into the UI action.

 

For step 1, I have added an attachment.

For Step2, Create an UI action that will call the script message in the UI action script. 

Thanks

Sudhanshu

I have followed the steps you mentioned and I could copy the fields Short description, description, assignment grp except caller.

Can you help on this?

 

Hi Navyaa,

Most of the time it happens because if I pass user_name of the user in the POST REST message, then we need to understand that it is a reference field(caller). It is showing the display value as caller id the actual value we need to pass in the REST message is the sys_id of that caller which should also exist on the target instance as well.

 

Hope it helps!

If need more assistance then you can share screenshots.

 

Thanks 

Sudhanshu

find_real_file.png