- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2026 12:34 AM
Hi Sumanth,
This is a classic hurdle when generating integration payloads with Reference or Look Up Select Box variables. Because these variable types inherently store the sys_id as their underlying value in the database, server-side scripts will pull that sys_id by default unless explicitly instructed otherwise.
A few things to check in your implementation:
Display Value Extraction: Inside your getVariableJSON Script Include, ensure you are utilizing .getDisplayValue() rather than just grabbing the value. For example: gr.variables.your_variable_name.getDisplayValue();.
Instantiation Differences: I noticed a slight syntax discrepancy between your snippets. In the background script, you instantiate the Script Include with new x_custom_scope.CustomScriptInclude(). In the Business Rule, you are calling it statically via CustomScriptInclude.getVariableJSON(...). Ensure your Script Include is properly structured to handle static calls if you aren't instantiating it, and double-check your application scopes.
Variable Context: Sometimes Business Rules (especially if running asynchronously) handle the current.variables object differently than a GlideRecord query in a background script.
Updating your Script Include to explicitly map display values for lookup variables should resolve the payload discrepancy.