Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

Flow designer always returning as 0

Prasun Sarkar7
Tera Expert

Hi I made a inbound flow where I am checking how many client visbility the user has on that basis I am actually sending an email if it is greater than 1 we are not creating a case and sending an email. I tried everything script include action everything this is my screenshot of the script include code and below that in the flow how I am calling it. When the flow is triggering via inbound action then this value is alwys 0 but when I am testing the flow using the same record or any other record its coming as 2.

PrasunSarkar7_0-1762258617541.png

PrasunSarkar7_1-1762258665230.png

 

 

7 REPLIES 7

@Prasun Sarkar7 

when you run in background script it shows some sys_script is restricted in domain

do you have domain separation enabled?

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

Yes our instance in domain separated like the flow is running in our organisations msp domain under which multiple customer domains are there. I tried to change the domain via the domain picker to msp and run the script in background it still runs and returns value.

@Prasun Sarkar7 

seems flow is unable to query that table due to domain separation

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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