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.

Passing Values from Interaction, within Agent Workspace, to a Catalog Item using a UI Action

keygw
Tera Guru

Needing assistance with getting interaction values passed to a Catalog Item within Agent Workspace using a UI Action. Our users would like to pass the following:

opened_for --> requestor

work notes --> comments

 

Here is what I have so far that opens the correct catalog item.

 

 

function onClick() {
	g_form.setValue('state', 'closed_complete');
g_form.save();
	//var result = g_form.submit('sysverb_ws_save');
	//if (!result) { // failed form submission
	//	return;
	//}
	//result.then(function() {
		var params ={};
		params.sysparm_parent_table = "interaction";
		params.sysparm_parent_sys_id = g_form.getUniqueValue();
		g_service_catalog.openCatalogItem('sc_cat_item','31b9b4206fc34200e6f77eeeae3ee416', '-1', params);
}

 

 

0 REPLIES 0