How to know about Portal ID or URL when Record Producer is submitted
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2023 01:33 AM
Is there any method by which can identify from which Service Portal [IT or HR], record producer is submitted?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2023 02:02 AM
Hi @CA5,
What exactly is your use case behind this?
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2023 02:08 AM - edited 06-24-2023 02:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2023 02:13 AM
Use Case - If RP is submitted from IT Service Portal then redirects to IT SP or if RP is submitted from ESC or Mobile app Portal then redirects to ESC or Mobile Aapp Portal

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2023 04:30 AM
Hi @CA5, @Nivedita Paliwa,
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.
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.