How to fix it
- Navigate to
System Definition > Script Includesand search for your Script Include by name. - Open the Script Include record and compare the
Namefield with the class name in theScriptfield. They must match exactly, including case. - If names don't match, update either the
Namefield or the class name in your script to make them identical. - Verify the
Activecheckbox is checked on the Script Include record. - Check the
Applicationfield on the Script Include and note the scope. - Navigate to your Business Rule at
System Definition > Business Rulesand check itsApplicationfield. - If they're in different scopes, either set the Script Include's
Accessible fromfield toAll application scopesor usesn_app_scope.ClassNamesyntax in your Business Rule. - Check for syntax errors by going to
System Logs > System Log > Alland filtering by your Script Include name. - If you find JavaScript errors, fix the syntax issues in the Script Include and save the record.
- Verify your Script Include has an
initializefunction if you're instantiating it with thenewkeyword. - Clear the instance cache by navigating to
System Diagnostics > Cache Statsand clickingFlush Allto ensure your changes are loaded. - Test your Business Rule by triggering the condition that executes it.
Test Script Include instantiation directly in Scripts - Background by running 'var test = new YourScriptIncludeName();' to quickly verify it loads without errors.