- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-21-2022 12:50 AM
If a Script Include extends another class, how can I call a method in the super class?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2022 04:22 PM
It actually turned out pretty simple:
yourParentClassName.prototype.yourMethodName.call(this, data);
// Example in initialize
initialize: function(make, model, color){
Car.prototype.initialize.call(this, make, model);
this.color = color;
}
I found this from the article below with an example and it works: https://community.servicenow.com/community?id=community_article&sys_id=7ef8d786db5d1cd023f4a345ca961...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2022 04:22 PM
It actually turned out pretty simple:
yourParentClassName.prototype.yourMethodName.call(this, data);
// Example in initialize
initialize: function(make, model, color){
Car.prototype.initialize.call(this, make, model);
this.color = color;
}
I found this from the article below with an example and it works: https://community.servicenow.com/community?id=community_article&sys_id=7ef8d786db5d1cd023f4a345ca961...