Creating new Interaction record inside Service Operation Workspace from UI Action on sys_user table

Ryan Stone
Tera Contributor

Hello All - 
So I am having a bit of a problem getting a UI Action to work.  I'll lay it out and hopefully someone out here in the larger community can tell me what ridiculously simple thing I am overlooking.

 

Requirements:

 

I need to have a UI Action called "Create New Interaction" that when clicked will open the Service Operation Workspace and within that workspace open a new Interaction record ready to be filled out with the type already pre-filled to "phone".

Current Solution:

Script: 

var url = "/now/sow/record/interaction/-1_uid_1/params/query/active%3Dtrue%5Etype%3Dphone";
action.setRedirectURL(url);

Result: 
This partially works.  It opens the workspace, but then I end up with a tab showing "Record Not Found"

RyanStone_0-1734532872406.png


The quirky thing is, The url is exactly what I would expect "...service-now.com/now/sow/record/interaction/-1_uid_1/params/query/active%3Dtrue%5Etype%3Dphone"

If I touch nothing and simply refresh the page as is.  The form loads as needed:

RyanStone_1-1734532999222.png

 

Can anyone point me in the direction of a solution for this issue or perhaps an alternative if my desired solution is not appropriate?

 

1 REPLY 1

Kristy Merriam
Administrator
Administrator

Hi @Ryan Stone!

 

How do you have your UI Action configured? I was able to create a UI Action with the same script (added a little extra to it even) and it worked without the refresh:

KristyMerriam_0-1734548334471.png

 

If this is all the same as yours, is there any chance the SOW has been modified?