update worknotes/ comments after workspace ui action is run

KubaS
Tera Contributor

hello all.
in HR Agent workspace, i needed to add ability to use printer friendly version. this is done by workspace client script, and works as expected:

function onClick(g_form) {
	
  var url = '/' + g_form.getTableName() + '.do?sys_id=' + 
            g_form.getUniqueValue() +
            '&sysparm_view=Workspace&sysparm_media=print';
  top.window.open(url, '_blank');
}

now, i need to make a note (either a new comment, or a work note, does not matter), in the activity stream, that this ui action has been run by user.
is there a way to achive this, using this ui action?
tried standard:
current.work_notes=...
current.update(),
tried calling glide record on sys_journal_field table, tried action.openGlideRecord (from here: https://www.servicenow.com/community/next-experience-articles/how-to-use-ui-actions-in-workspaces/ta...), and didnt get activity stream populated.... any ideas, on how can i do it?

regards,
Kuba
 

0 REPLIES 0