Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Populate field using url in Service Operation Workspace

Alon Grod
Tera Expert

Hi,

Is there any way to populate a field in SOW using url. The field is 'kb_knowledge_base' which is a reference field. 

my_instance_url/now/sow/record/kb_knowledge/-1

What should I put after '-1' in order to populate the field 'kb_knowledge_base' ?

2 REPLIES 2

Ramesh_Naidu
Mega Guru

Hi @Alon Grod ,

 

you can use my_instance_url/now/sow/record/kb_knowledge/-1/params/query/kb_knowledge_base%3D<sys_id of knowledge base>

 

Thankyou

BurtCrepeault-E
Giga Guru

Hi @Alon Grod ,

 

The -1 value tells SOW to create a new record. If you want to refer to an existing record, use the sys_id instead, but in that case, the /params/query/kb_knowledge_base part of the URL doesn't do anything. 

 

I'm also looking for a solution for this, and so far, all I know it that, for a new interaction, this populates the opened_for field in the SOW form:

 

/now/sow/record/interaction/-1/params/query/opened_for=fd1fcc878711ce908f7275d8dabb351e

 

But for an existing record, this doesn't:

 

/now/sow/record/interaction/b92a42a9936822109cb7b91c5cba102b/params/query/sysparm_query=opened_for=fd1fcc878711ce908f7275d8dabb351e