Using client script from parent table in child table

Mayank Das
Tera Contributor

Hello all

 

Please suggest if there is a way to use an onChange client script written in 'alm_asset' table for 'install_state' field to be used in 'alm_hardware', 'alm_consumable' and 'alm_license' tables?

 

I want to use the same onChange client script for all the three tables for the same field. But when I am providing alm_asset as the table name in the client script form, the client script does not work for Hardware, Software and Consumables table.

 

Can anyone please help?

1 ACCEPTED SOLUTION

Tai Vu
Kilo Patron
Kilo Patron

Hi @Mayank Das 

Have you tried to enable the Inherited checkbox?

Timi_0-1701930807947.png

 

Inherited: If selected, this script applies to the specified table and all tables that inherit from it. For example, a client script on the Task table will also apply to the Change, Incident, Problem and all other tables which extend Task.

 

Cheers,

Tai Vu

View solution in original post

2 REPLIES 2

AshishKM
Kilo Patron
Kilo Patron

Hi @Mayank Das ,

 

In case of Asset ( alm_asset ) table, it will not work. You have to define/configure all logic per child table.

This Asset table is not like Task table, where there is only one Task table at database side rest is logical.

 

Refer this for more details on Extension Model

https://docs.servicenow.com/bundle/vancouver-platform-administration/page/administer/platform-perfor...

AshishKMishra_0-1701907929415.png

 

-Thanks,

AshishKMishra


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution

Tai Vu
Kilo Patron
Kilo Patron

Hi @Mayank Das 

Have you tried to enable the Inherited checkbox?

Timi_0-1701930807947.png

 

Inherited: If selected, this script applies to the specified table and all tables that inherit from it. For example, a client script on the Task table will also apply to the Change, Incident, Problem and all other tables which extend Task.

 

Cheers,

Tai Vu