Embedded attachments not being sent
There has been a change to GlideSysAttachment
from when some of our original extract attachments scripts were written, and when now passing the base64 decoded string as a byte array to the global GlideSysAttachment.write()
method. Unifi has specialised debugging and because of this, the byte array ends up as null when Unifi debug mode is off. We suspect this is because ServiceNow routes the variable through some coercion in the Rhino environment when passing it through Unifi which forces it to work. Without the debug mode turned on, the byte array is being passed through and for some reason that isn't clear, it is treated differently.
You need to update the extract attachment script to something similar below:
PreviousNew record attachments are not sent from PortalNextSpecial characters in attachment file names
Last updated