UI action in Customizable workspace to open new record that has prepopulated values?

DrewW
Mega Sage
Mega Sage

So I have a customizable workspace and I need to add a UI Action that will open a new record and that record needs to have fields prepopulated.  I do not want the record saved until the user has populated other fields.

 

I found the docs for glideagentworkspace (g_aw) and that does not have any options for populating field.

https://developer.servicenow.com/dev.do#!/reference/api/xanadu/client/GlideAgentWorkspaceAPI?navFilt...

 

I also found this but I cannot find a way to get it to work.

https://www.servicenow.com/community/developer-forum/how-to-open-a-quot-new-quot-record-tab-in-works...

 

So just checking if there is an easy way to do this that I'm missing before I go an do something complicated for something that is easy on the platform interface.

 

Any help or suggestions would be appreciated.

 

Please and thanks

1 ACCEPTED SOLUTION

Diogo Ramos
Giga Sage

Hello, 

I tried the following approach :
Ui action client enabled, then workspace client script which will just call the server script of the action, and then the server side code that does a redirect url with the specific query you want.

DiogoRamos_0-1728587885762.png

Worked quite well on my xanadu pdi :

DiogoRamos_1-1728587929909.png


Hope it helps.

Cheers



View solution in original post

5 REPLIES 5

Diogo Ramos
Giga Sage

Hello, 

I tried the following approach :
Ui action client enabled, then workspace client script which will just call the server script of the action, and then the server side code that does a redirect url with the specific query you want.

DiogoRamos_0-1728587885762.png

Worked quite well on my xanadu pdi :

DiogoRamos_1-1728587929909.png


Hope it helps.

Cheers



Does it open the record in the current workspace as subtab of the current tab?

 

I shale experiment.

 

On my testing it did indeed open it as subtab of the current record.

Well ill be darned, that was a clever solution and worked great.  I will have to use it more often.