Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to override a function from protected script include

Arun_Manoj
Mega Sage

How can I override a function from a protected Script Include?
The Script Include is protected, and the function I want to change calls a private method.
I need to modify the behavior of that private method — is this possible, and how can it be done?

2 REPLIES 2

Sarthak Kashyap
Mega Sage

Ankur Bawiskar
Tera Patron
Tera Patron

@Arun_Manoj 

extend the OOTB script include by creating your own script include and override that method in your own script include

Script includes and customization 

Extend Script Include In ServiceNow 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader