- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2026 07:06 AM - edited 08-05-2026 07:07 AM
Dynamic Filter - "My contact relationships"
It is refering to "new sn_cs_queryrules.AccountQueryRuleUtil().getAccountsFromContactRelationship();" this function call but when we checked "AccountQueryRuleUtil()", it do not have "getAccountsFromContactRelationship()" method on it.
Please help to understand.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2026 10:52 AM
Hi @SaurabhAgarwal ,
1.AccountQueryRuleUtil does not implement getAccountsFromContactRelationship() directly. Instead, it extends the global.Account Script Include.
2.Again the Account Script Include also does not implement this method directly. It extends AccountImpl
3.The getAccountsFromContactRelationship() method is defined in AccountImpl.
4.This is an example of Script Include inheritance in ServiceNow. Methods defined in the parent Script Include are inherited by child Script Includes, Therefore, it is available to both Account and AccountQueryRuleUtil through the inheritance chain.
This is why new sn_cs_queryrules.AccountQueryRuleUtil().getAccountsFromContactRelationship() works even though the method isn't explicitly present in AccountQueryRuleUtil.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2026 10:52 AM
Hi @SaurabhAgarwal ,
1.AccountQueryRuleUtil does not implement getAccountsFromContactRelationship() directly. Instead, it extends the global.Account Script Include.
2.Again the Account Script Include also does not implement this method directly. It extends AccountImpl
3.The getAccountsFromContactRelationship() method is defined in AccountImpl.
4.This is an example of Script Include inheritance in ServiceNow. Methods defined in the parent Script Include are inherited by child Script Includes, Therefore, it is available to both Account and AccountQueryRuleUtil through the inheritance chain.
This is why new sn_cs_queryrules.AccountQueryRuleUtil().getAccountsFromContactRelationship() works even though the method isn't explicitly present in AccountQueryRuleUtil.
