You’re currently using log.error() in your BeanShell script, which writes messages to the server logs (like catalina.out if you’re using Tomcat). That’s why you’re seeing a blank screen—it’s not designed to display output in the UI.
HI @noob_iiq , You have two return statement , code exited in first return statement itself , thats why its not going to 2nd return statement costcenter one.
comment first return statement . it will work.
Thanks.
When writing BeanShell code in a Rule object on the debug page of SailPoint IdentityIQ, you’re limited to using only onereturnstatement. This means:
You cannot print multiple attributes using return, because once the return statement executes, the script exits.
If you try to return multiple values or print multiple lines, only the first one will be executed.
To work around this limitation and still inspect multiple attributes, you should use the Apache Log4j logging framework, which is integrated into IdentityIQ. This allows you to log as many values as you need before the script exits.
It’s not a limitation or strange behaviour . I would recommend to explore Core Java , it will help you in writing code .
You can create a string and append all the variable which you want to see as per your format . And return that string .