Hi @SumanthK7729163 

 

may you try replace 


var variableJSON = vendorIntegrationOutboundUtils.getVariableJSON(current.request_item.toString());

to 

 

var variableJSON = vendorIntegrationOutboundUtils.getVariableJSON(current.getValue('request_item'));

The issue occurs because in scoped Business Rules within ServiceNow, using ⁠current.request_item.toString()⁠ can fail to extract the pure string of the reference ⁠sys_id⁠, passing a ⁠GlideElement⁠ object instead. This causes the ⁠GlideRecord⁠ query in the Script Include to fail or behave inconsistently.


The correct way to retrieve the
⁠sys_id⁠ as a clean string within the Business Rule context is to use ⁠current.getValue('request_item')⁠.

 

 

View solution in original post