Redirect a record producer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-21-2024 01:15 PM
Hi All,
we have a record producer which creates record in scoped table. The requirement is after a user submits it first time whenever user opens record producer form again it should redirect to the record already submitted. The idea here is to allow only one submission per user
How can we achieve this?
Thank you!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-21-2024 01:54 PM
You will need an onLoad catalog client script to first check if a record exists.
If yes, in the same client script use window.location to navigate to the record
window.location="<tablename>.do?sys_id=<sysid>"
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-21-2024 01:59 PM
Hi, I would try adding the target record sys_id to client session data with an after insert BR, to identify when a user should be redirected. And then an onload client-script (for the record producer) to check if this value is populated, if it use the sys_id in a redirect url (but first clear the session value).
Server Scoped API | ServiceNow Developers
Client Side API | ServiceNow Developers
ServicePortal - How to redirect to page / Catalog ... - ServiceNow Community
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-21-2024 02:45 PM
Hi @pramodkumar ,
Please refer the below article where user has done something similar,
Please mark this comment as Correct Answer/Helpful if it helped you.
Regards,
Swathi Sarang