How to fix it

  1. Navigate to System Definition > Script Includes and search for your Script Include by name.
  2. Open the Script Include record and compare the Name field with the class name in the Script field. They must match exactly, including case.
  3. If names don't match, update either the Name field or the class name in your script to make them identical.
  4. Verify the Active checkbox is checked on the Script Include record.
  5. Check the Application field on the Script Include and note the scope.
  6. Navigate to your Business Rule at System Definition > Business Rules and check its Application field.
  7. If they're in different scopes, either set the Script Include's Accessible from field to All application scopes or use sn_app_scope.ClassName syntax in your Business Rule.
  8. Check for syntax errors by going to System Logs > System Log > All and filtering by your Script Include name.
  9. If you find JavaScript errors, fix the syntax issues in the Script Include and save the record.
  10. Verify your Script Include has an initialize function if you're instantiating it with the new keyword.
  11. Clear the instance cache by navigating to System Diagnostics > Cache Stats and clicking Flush All to ensure your changes are loaded.
  12. 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.