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.

Best Practices for Using UI Actions and Script Includes Across Scopes in ServiceNow

AnjalPDijo
Giga Guru

When working across different application scopes in ServiceNow, it's important to ensure proper configuration for UI Actions and Script Includes to function as expected. Here are a few key points to keep in mind:

 

  1. Using a UI Action from Another Scope:

    • If you're referencing a UI Action from a different scope, make sure:
      • The table it’s associated with has “Accessible from other application scopes” checked under the Application Access tab.
      • The UI Action itself is marked as “Accessible from all application scopes”.
  2. Calling a Script Include from a Business Rule (Different Scope):

    • When invoking a Script Include from a Business Rule that resides in a different scope:
      • Prefix the Script Include name with sn_ (e.g., sn_MyScriptInclude) to ensure proper cross-scope access.

These small but crucial configurations help avoid scope-related errors and ensure smooth functionality across scoped applications.

3 REPLIES 3

Ravi Gaurav
Giga Sage
Giga Sage

Hi @AnjalPDijo 

 

When building solutions that span multiple application scopes, a few key configurations ensure that your UI Actions and Script Includes work correctly.

1. Using a UI Action from Another Scope

If a UI Action is defined in a different scope:

  • Ensure the table it’s linked to has “Accessible from other application scopes” checked under the Application Access tab.

  • The UI Action itself should be marked as “Accessible from all application scopes.”

This allows other scoped applications to execute or reference that UI Action safely.

2. Calling a Script Include from Another Scope

If a Business Rule, UI Action, or Flow in one scope needs to call a Script Include from another:

  • Prefix the Script Include name with sn_ (for example, sn_MyScriptInclude).

  • This prefix tells the platform to look for the Script Include in a different scope that has been set to “Accessible from all application scopes.”

--------------------------------------------------------------------------------------------------------------------------


If you found my response helpful, I would greatly appreciate it if you could mark it as "Accepted Solution" and "Helpful."
Your support not only benefits the community but also encourages me to continue assisting. Thank you so much!

Thanks and Regards
Ravi Gaurav | ServiceNow MVP 2025,2024 | ServiceNow Practice Lead | Solution Architect
CGI
M.Tech in Data Science & AI

 YouTube: https://www.youtube.com/@learnservicenowwithravi
 LinkedIn: https://www.linkedin.com/in/ravi-gaurav-a67542aa/

Ankur Bawiskar
Tera Patron
Tera Patron

@AnjalPDijo 

is this an information or a question?

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

Hi @Ankur Bawiskar ,
Thanks for asking! This was just something I wanted to share from my experience — not a question. Hope it helps someone working across scopes.