Onsubmit catalog client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2025 11:42 PM
Hi Team,
I've created an on-submit catalog client script that is intended to function exclusively on RITM records. This script is designed to initiate approvals based on specific variables, and the approval records should be linked to the RITM. However, after implementing it with a script include, I am experiencing issues with duplicate approval records being triggered. Additionally, I have heard from other users that using an on-submit catalog client script for RITM is not considered best practice. Do you have any suggestions?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2025 01:10 AM
You can even generate approvals using flow and flow can wait till the RITM variables are updated.
It would be somewhat time consuming to configure that considering your UI button is already functioning as expected.
OnSubmit client scripts are simply used to handle validations and stop user from submitting the form and not the ideal case to generate approvals.
Now if the RITM form is submitting multiple times it will lead to multiple approvals which is not expected.
Let the users click UI button and generate approvals.
You can also hide that button once approvals are generated so that it's hidden and doesn't generate duplicate approvals again.
I hope I was able to explain.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2025 01:14 AM
Hi @geogeorge
You’ve already made a customization, and that could be causing the issue now. I would recommend moving this to Flow, where you can use low-code features like 'Wait for Condition' or time-based actions, and trigger the approval later on.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************