Client script running on parent table with inherited true causing issue on child table

Inya
Tera Contributor

Dear all,

There is a new table (xyz) that i have created for one of my requirements.

This new table is the child table of hr table.

On my table xyz i had been trying to write an onsubmit client script to make attachment mandatory (on case or table level - not on catalog form or not catalog clients scripts, but its a client script).

The issue is that there is one existing on-submit client script written on the hr/ parent table which is 'inherited' set to true and causing issue with my attachment mandatory script on child table.

(Issue is that after mandatory attachment check, my case keeps on loading non-stop, and if i deactivate the existing script written on parent hr, my xyz table's attachment mandatory script works very fine)

Note : Even i have tried using condition for checking tablename - g_form.getTableName()=='xyz' which is of no use. Help out here to make my attachment mandatory through any means of best approach.

6 REPLIES 6

Hows everything working for you now?


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

asifnoor
Kilo Patron

Hi,

Add ordering to your client scripts and try to have your client script execute first and check.

Kindly mark the comment as a correct answer and helpful if it helps to solve your problem.

Regards,
Asif
2020 ServiceNow Community MVP