Unable to encrypt attachments using a bulk encryption script from documentation (https://docs.servicenow.com/bundle/kingston-platform-administration/page/script/server-scripting/concept/c_EncryptionScripting.html).
The script throws an error stating:
The cause may be that the execution of the script is being done in the same scope as the table containing the attachment
The execution of the script needs to be done in the global scope either as a background script, UI Action or Business rule.
The encryption context and associated sys_user_role can be in either global scope or in the scope of the table, but the execution of the script needs to be in global scope.