Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

On Submit Client Script not working on Catalog Mandatory Attachment

Sandeep Goudar
Tera Contributor

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.

 

 

2 ACCEPTED SOLUTIONS

Hello @Sandeep Goudar ,

 

You can create a Business Rule (or a Flow) on the sc_req_item table, as shown below:

 

RobertH_0-1745937169431.png

 

Regards,

Robert

View solution in original post

@Sandeep Goudar 

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.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

7 REPLIES 7

Hello @Sandeep Goudar ,

 

You can create a Business Rule (or a Flow) on the sc_req_item table, as shown below:

 

RobertH_0-1745937169431.png

 

Regards,

Robert

@Sandeep Goudar 

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.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Sandeep Goudar
Tera Contributor

Thank you, @Robert H  and @Ankur Bawiskar  I implemented both solutions, and they were both effective.

 

Regards,

SG