There are certain fields, such as number, that are protected regardless of cross-scope privileges. These fields were protected in order to provide functionality in other areas. We get these "Access to api" error similar to below when we try to update them from other scopes.
Security restricted: Access to api 'put(x_scope_table.number)' from scope 'x_scope has been refused due to the api's cross-scope access policy.
Why these fields are protected?
- We allow a scoped table to extend from a global table. In order to allow the number field to be managed by the scoped table, we have to explicitly protect it in the global scope.
- We allow a scoped script to manipulate the sys_created_on, sys_updated, etc fields. In order to allow the use of autoSysFields() method, we have to explicitly protect the sys_mod_count field.
If you see this error for fields other than these system protected fields, You can follow this knowledge Article to resolve the issue.