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  

Calling Script Include for a filter not working

KW68
Tera Expert

I have a script include that work when called from 'Scripts - Background' but when called from a filter it does not work. I hardcode a sys_id in the script just to make it simple and so I know there shouldn't be a script issue. I set it to client callable, and it ask me for a role. I selected admin, since I am an admin in DEV. Not sure what I am missing to get it to work from a filter. 

Works with hardcode sys_id in filter:

KW68_0-1755188605532.png

But not with a call to the script:

KW68_1-1755188644394.png

Here is the script include:

KW68_2-1755188676442.png

 

This is it ran from Scripts - Background:

KW68_3-1755188716638.png

I am wondering if it was a access privilege issue, but I made sure the role was Admin. I even tried elevating my role to security_admin. 

2 ACCEPTED SOLUTIONS

Bhuvan
Giga Patron

@KW68 

 

Refer below for sample,

 

Bhuvan_1-1755227393032.png

Bhuvan_3-1755227458864.png

Bhuvan_4-1755227490977.png

If this helped to answer your question, please accept the solution and close the thread.

 

Thanks,

Bhuvan

View solution in original post

I should have mentioned why. It appears there was nothing wrong with my original code. I just needed to make sure I checked 'sandbox enabled'. That is the reason I was getting a NULL response.

Thanks Bhuvan.  

 

View solution in original post

10 REPLIES 10

KW68
Tera Expert

Oops, wrong screen print. The j was cut off. Look at this one please: 

KW68_0-1755190048416.png

 

JackieZhang
Tera Contributor

Please unchecked the check box "client callable".

Bhimashankar H
Mega Sage

Hi @KW68 ,

 

You pasted wrong in operand field and it is "avascript:new <yourScriptIncludeName>"

 

Make it "javascript&colon;new <yourScriptIncludeName>". It should work

 

Thanks,
Bhimashankar H

 

-------------------------------------------------------------------------------------------------
If my response points you in the right directions, please consider marking it as 'Helpful' & 'Correct'. Thanks!

Thanks for the quick response. 

I include the wrong screen print in the original post. I updated it with the correct one. Must have been after you saw the post. To me it looks like the script is being called but is returning NULL.