Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Script include in Service bridge

supriyapriy
Tera Contributor

While configuring service bridge, we face the below challenges.

Does the client script, variable sets and client callable script includes copy over to the consumer instance ? We don't see them flowing through. 

Are there any documentation around, list of tables config that gets copied over to the remote record producer.

As I Checked with Error and manually add the script include in consumer instance and is working now.
But How to Sync the script include from provider to consumer instance?

1 REPLY 1

Naveen20
ServiceNow Employee

Scripts do not get carried over to the consumer instance, and this is intended for security reasons. This applies to client scripts, client-callable Script Includes, and any server-side scripting artifacts. The rationale is that allowing arbitrary code execution from a provider on a consumer's instance would be a significant security risk.

What DOES get replicated to the consumer instance:

  • RRP variables and their definitions
  • Catalog UI Policies can be used and will be replicated to the consumer instance.
  • Variable set support was added with the February release of Service Bridge (v1.1.0).
  • Consumer Criteria and Persona entitlements
  • Remote Choice definitions (for real-time provider data lookups)
  • Remote Task Definitions with field mappings and transforms

What does NOT replicate:

  • Client Scripts
  • Client-callable Script Includes (which is exactly why your GlideAjax calls are failing with 404)
  • Business Rules
  • Custom server-side Script Includes
  • Custom flows/subflows (these need to exist independently on each instance)

How to handle the Script Include gap:

Since there's no automatic sync mechanism for Script Includes, you have a few options. First, you can do what you've already done — manually recreate the necessary Script Includes on the consumer instance. Second, you can refactor your logic to use Catalog UI Policies instead of client scripts, since those do replicate. Third, for dynamic data needs, consider using Remote Choice definitions, which let the consumer pull real-time data from the provider without needing local scripts. Fourth, if you're promoting configurations across environments, for Remote Record Producers, capture the RRP, RRP Variables, Consumer Criteria, and associated custom flows/scripts in the same update set.