Join us Dec. 16 for The Community Hour, our first global virtual User Group event!

Get to know about Portal ID or URL

CA5
Tera Contributor

Is there any method by which can identify from which Service Portal [IT or HR] , record producer or catalog item form is submitted?    @Ankur Bawiskar 

 

6 REPLIES 6

@CA5 

you can access the hidden variable value inside record producer script and do the redirection

Maybe not the prettiest solution, but should work:

Create a (hidden) variable 'portal_id'.

Create a catalog client script: onLoad:

function onLoad() {
	g_form.setValue('portal_id', getPortalID());

  function getPortalID() {  
    var regexS = "[/][A-z]*[?]";  
    var regex = new RegExp(regexS);  
    var results = regex.exec(top.location);  
    if (results == null) {  
        return "";  
    } else {  
		var answer = results.toString();
        return  answer.substring(1,answer.length-1);
    }  
}
}

 

You could then do the redirection based on the variable.