- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2025 06:04 AM - edited 04-29-2025 06:13 AM
Hello,
I have written an OnSubmit Catalog Client Script to print an info message. In the catalog, I have made the attachment mandatory. However, whenever I try to submit without attaching a file, the info message from the script gets triggered. This is not the intended behavior; the OnSubmit script should only trigger upon actual submission.
If anyone has faced a similar issue or has a solution, please help me out.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2025 07:33 AM
Hello @Sandeep Goudar ,
You can create a Business Rule (or a Flow) on the sc_req_item table, as shown below:
Regards,
Robert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2025 07:35 AM
you can write after insert business rule on sc_req_item with condition as this to show the message after user submits request
current.cat_item.name == 'Your Item Name Here'
Script:
gs.addInfoMessage("Your request to deactivate the user has been successfully submitted.");
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
04-29-2025 07:33 AM
Hello @Sandeep Goudar ,
You can create a Business Rule (or a Flow) on the sc_req_item table, as shown below:
Regards,
Robert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2025 07:35 AM
you can write after insert business rule on sc_req_item with condition as this to show the message after user submits request
current.cat_item.name == 'Your Item Name Here'
Script:
gs.addInfoMessage("Your request to deactivate the user has been successfully submitted.");
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
04-29-2025 08:17 AM
Thank you, @Robert H and @Ankur Bawiskar I implemented both solutions, and they were both effective.
Regards,
SG