Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Cross-scope glide.record.legacy_cross_scope_access_policy_in_script

Martin105
Tera Contributor

Hi, I have spent several hours on this already and I cannot find a solution

I recently set 

glide.record.legacy_cross_scope_access_policy_in_script=false

   and it broke my BR running in sn_si. The BR is creating a Draft Email. I am getting an error:

Access to api 'setValue(sys_email_draft.body)' from scope 'sn_si' has been refused due to the api's cross-scope access policy.
 

 This is expected behaviour but I was not able to find a fix. I set cross-scope policy:

Martin105_0-1763238133118.png

But it did not fix it. I tried tons of other variants but I believe this it the right one. Does any one has an idea how the policy should be set after reinforcing the platform. 

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@Martin105 

seems you are trying to insert data into "sys_email_draft" table from other scope.

In the above table did you try marking Can Create = True at table level

AnkurBawiskar_0-1763261944536.png

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Yes. Thats exactly what I am doing!!! This setting is there whole time of course.  How would ever be possible to create records even with glide.record.legacy_cross_scope_access_policy_in_script=true without Can Create ?