- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-05-2016 10:26 PM
Hi All,
I have setup a business rule on the sys_attachment table to encrypt all attachments with an encryption context. This works fine, except for when sending notifications.
The code on the business rule is:
var contextGR = new GlideRecord('sys_encryption_context');
contextGR.addQuery('name', 'ess');
contextGR.query();
if (!contextGR.next()) {
gs.log("[ERROR] No encryption context found");
}
var encryptionID = contextGR.getUniqueValue();
if (encryptionID != "") {
var sysAttachment = new GlideSysAttachment();
sysAttachment.changeEncryptionContext(current.table_name, current.table_sys_id, current.sys_id, encryptionID);
}
The email notification is configured to include an attachment on the table it is associated with:
And the email processed in the outbox is sent, but because the attachment is encrypted, it does not get included in the email sent. If the encryption business rule is turned off it works fine.
So, does anyone know how to make it so the email notification decrypts the attachment on send? My thought at the moment is to decrypt the attachment, send the notification then re-encrypt the attachment (within the business use cases of course). But this seems like a bit of a hack.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-07-2016 09:39 AM
Hi Luke,
Unfortunately this is a know PRB with the platform, the end result as you have mentioned is an email that is missing its encrypted attachment. This problem will be reviewed by our development team but it will take time before a fix is implemented.
Thanks,
Brad

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-07-2016 09:39 AM
Hi Luke,
Unfortunately this is a know PRB with the platform, the end result as you have mentioned is an email that is missing its encrypted attachment. This problem will be reviewed by our development team but it will take time before a fix is implemented.
Thanks,
Brad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-07-2016 05:53 PM
Thanks for that info Brad. Are able to let us know the PRB number?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-08-2016 08:04 AM
Hi Luke,
Sure this issue is documented under PRB639238.
Regards,
Brad

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-21-2022 07:00 AM
Hi Brad
It's been 5 years now and as far as I can tell, nothing has changed.
I want to have ServiceNow encrypt an attachment and then be able to send it out as an encrypted attachment and be able to supply the key so the recipient can open the attachment.
How do I voice my needs to ServiceNow?