Client Scripts and and overriding parent table

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2019 02:01 PM
Hey coders,
Use case:
1. The client wants the location set differently for SIR then the OOB Client Scripts that are inherited from Service Order.
2. I would like to minimize the changes to the OOB Client Scripts. (i.e. not change the OOB scripts if possible)
3. I would like to preserve the OOB functionality.
- I do realize I could uncheck Inherited, but what if other tables wanted to use these inherited scripts?
- I do realize I could copy the OOB scripts then test for the table I am on and apply custom logic... but that seems like a brute force approach.
Is it possible to "override" or not inherit the client scripts?
Thanks in advance for your help,
-Chris
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2019 02:13 PM
I do not see any other way other than making a copy of the OOB client script. deactivate the OOB. And in the custom one add an if condition to check for the table name. Something like this
if(g_form.getTableName()!='sn_si_incident'){
//put the logic here
}