UI Action: Passing reference variables to service portal

mahmoudkhal
Tera Contributor

Hello everyone, as the title suggests, I am currently looking for a way to reference incident forms through a UI action and point it to our service portal. How can this be done? 

I'm currently using a client-scriptUI Action:

function createRequest() {
	var sys_id = g_form.getUniqueValue(); // Gets sys_id of current incident
	var caller = g_form.getDisplayBox('caller_id').value;
	window.open("esc?id=sc_cat_item&sys_id=<sys_id_of_record>&sysparm_caller=" + caller); // Opens the mySupport Service Catalog in a separate browser
	console.log(sys_id);
	console.log(caller);
}

I'm not opposed to using a server-side script if that's the best way to go about it. I'm trying to make the URL dynamic so it references the 'caller' part of the incident no matter what catalog item they select. 

Field I'm attempting to reference: 
caller_id -> u_requested_for

Thanks 

1 REPLY 1

Murthy Ch
Giga Sage

@mahmoudkhal 

What is the issue you're facing here?
I believe i've answered the similar question recently here. Please have a look on it. lmk if you still stuck.

Happy to help:)

Thanks,
Murthy