What function to use other than setworkflow(false) to stop Business rules from processing.

Roshini
Tera Contributor

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?

3 REPLIES 3

Elijah Aromola
Mega Sage

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?

Ravi Chandra_K
Kilo Patron
Kilo Patron

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.

 

Roshini
Tera Contributor

@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?