- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-05-2022 02:17 AM
Hello,
We have a record producer for onboarding new cases. In the redirect to option we need to have a custom page. In that custom page the requirement is to have 3 links newly created Case request link , HR services link(back to record producers) and homepage. I can able to have the HR services link and homepage link in that custom page but not sure how to include the created case request in that custom page is there any way to pass the sysid of created case record from record producer to that custom portal page.
Regards,
Sheeja
Solved! Go to Solution.
- Labels:
-
Service Portal Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-05-2022 04:22 AM
When you redirect the user to the new page in the record producer script, you can include a parameter with the sys_id - as an example where my page is mywidgetpage and the param is case_id:
producer.portal_redirect = "sp?id=mywidgetpage&case_id=" + current.getUniqueValue();
Then, in your widget, you can read the parameter of case_id from the URL
var caseID = $sp.getParameter('case_id');
//construction your link
I hope this helps!
If this was helpful, or correct, please be kind and mark the answer appropriately.
Michael Jones - Proud member of the GlideFast Consulting Team!
Michael D. Jones
Proud member of the GlideFast Consulting Team!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-05-2022 04:22 AM
When you redirect the user to the new page in the record producer script, you can include a parameter with the sys_id - as an example where my page is mywidgetpage and the param is case_id:
producer.portal_redirect = "sp?id=mywidgetpage&case_id=" + current.getUniqueValue();
Then, in your widget, you can read the parameter of case_id from the URL
var caseID = $sp.getParameter('case_id');
//construction your link
I hope this helps!
If this was helpful, or correct, please be kind and mark the answer appropriately.
Michael Jones - Proud member of the GlideFast Consulting Team!
Michael D. Jones
Proud member of the GlideFast Consulting Team!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-08-2022 01:31 AM
Hi Michael Jones,
Thanks for your response. One more query ,
- After clicking on submit, if there is any error, it should be shown on Custom portal page
Is there any ways to get to pass the error messages to the custom widget?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-08-2022 05:29 AM
You could wrap your Producer script in a try/catch and then add the error to the URL as a parameter, the same way you are adding the sys_id - since it would be a text string you'd need to URL encode it. In your widget you would need to check if the parameter is anything other than "none" and then display it
Producer
var eString = 'none';
try {
//Your code here
} catch(e) {
eString = encodeURI(e.message);
}
producer.portal_redirect = "sp?id=mywidgetpage&case_id=" + current.getUniqueValue() + '&error=' + eString;
Widget
var rpError = $sp.getParameter('error');
if(rpError != 'none') {
data.error = rpError;
}
I hope this helps!
If this was helpful, or correct, please be kind and mark the answer appropriately.
Michael Jones - Proud member of the GlideFast Consulting Team!
Michael D. Jones
Proud member of the GlideFast Consulting Team!