What function to use other than setworkflow(false) to stop Business rules from processing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2023 03:50 AM
Hi,
I need to retire articles through a fixscript.To stop the business rules automation, I have used setworkflow(false).
But the setworkflow is not working because of the cross scope.
This is the error I am getting:
"GlideSession message was modified by sanitization. [message=Access to api 'setWorkflow' from scope '' has been refused due to the api's cross-scope access policy]."
Is there any different function or way to do this?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2023 06:17 AM
Can you provide more information? Are you running this fix script from a scope and the BRs are global? Or the reverse?
Could you attempt to create a script include inside the target scope that makes the modification and then setWorkflow false from there?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2023 12:01 AM
Hello @Roshini
Greetings!
There is no scoped alternative function for SetWorlflow. It only works in global.
as Elijah suggested, To resolve this, you can create a new script Include in the global scope with a function which has the query and the setWorkflow false in it.
Please hit the thumb and Mark as correct based on Impact!!
Kind Regards,
Ravi Chandra.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2023 03:53 AM
@Elijah Aromola @Ravi Chandra_K
The business rules are in global.
When i have ran the fix script in global,i am getting this error:
"Cannot disable before query business rule(s) across scope boundaries"
And when i ran the fix script in the application scope,i am getting this error:
"GlideSession message was modified by sanitization. [message=Access to api 'setWorkflow' from scope '' has been refused due to the api's cross-scope access policy]."
Could you attempt to create a script include inside the target scope that makes the modification and then setWorkflow false from there?
To resolve this, you can create a new script Include in the global scope with a function which has the query and the setWorkflow false in it.
could you please elaborate this?