Cross-scope error when using @mention in Work Notes/Comments on scoped Task-extended tables.

Dikshya
Tera Contributor

Hi all,

 

We are facing a cross-scope access error when using @mention in Work Notes or Additional Comments on tables that are created in a custom application scope (EITG) and extend from the Task table (Global scope).

 

Error message:

Access to API 'setWorkflow' from scope 'x_weoi2_eitg_conf' has been refused due to the API's cross-scope access policy. 

Access Details: setWorkflow can only be called from within the same Scope as the Table on which it is called. 

Table's Scope was: "Global", but executing Scope was: "EITG".

 

What we checked:

 

  • This happens only when an @mention is added in Work Notes or Additional Comments.
  • Occurs in both DEV and PROD with any user.
  • We searched all Business Rules, Script Includes, UI Actions, and Flows in our app scope (EITG). Only one Script Include had a setWorkflow(false) line, which we commented, but the error still persists.
  • It seems the error is triggered by the OOB @mention journal field processor, not by our custom code.

Our Question:

 

  • Has anyone else faced this issue on scoped Task extensions?
  • Is there a recommended workaround to handle @mentions without hitting the cross-scope setWorkflow restriction?

 

Dikshya_0-1756903863042.png

 

 

 

 

2 REPLIES 2

Swathi P
Kilo Sage

Hi Is this issue solved I am also having same issue

 

Sheldon  Swift
ServiceNow Employee
ServiceNow Employee

Hi @Dikshya - When using setWorkflow(false), the script and the table on which setWorkflow(false) is applied must be in the same scope. For testing, see if temporarily deactivating the "Send Notification" BR on the Notification [live_notification] resolves the issue. Then you can determine next steps.