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

Ashutosh Munot1
Kilo Patron
Kilo Patron

Hi,

Can't you use business rule for this, before update insert BR can help you here.

Also, can you tell me OOB script on HR table? Name will do.

Thanks,
Ashutosh

Allen Andreas
Administrator
Administrator

Hi,

We'd need to know the name of the Client Script that is inherited, or at the very least the code from that client script as well as your code from your mandatory attachment client script (just to help ensure things are operating as they should).

Have you tried to possibly set the order to have the inherited client script run before your attachment mandatory script and see if that simple adjustment helps?

Please mark reply as Helpful/Correct, if applicable. Thanks!


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

Hi,

I just wanted to check-in and see how you're doing.

If my reply above helped answer your question and guide you correctly, please mark it as "Helpful" and "Correct.

If you still need assistance, let us know.

Thanks!


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

Hi Allen, Thanks for the response.

I tried to integrate the 2nd script i wrote on my new table on the existing parent table's script but this time somewhere inthe middle of all if conditions on the parent client script and that seemed to work.

However more UT needed to be done, will come back incase of issues.