Hello,
I am attempting to write a PDF to a network drive, but keep running into issues. I have researched it a bit, and also have sucessfully wrote it to a local drive plenty of times, but keep running into the error below when attempting the network route.

I have reviewed the permissions of the service account I am using with new NetFile, and ensured the parent directory already exists.
Below is the code I am using. It is converting a Base64, then writing that PDF to file and including the network path in the HL7 that continues to Centricity:
//get the encoded OBX5 where the type is Base64
var obx5Decoded = qie.base64DecodeToBytes(message.getNode('OBX-5[3]'));
// + qie.formatDate('MMddYYYY', qie.getSystemDate()) + '
var mrn = message.getNode('PID-2');
var evntdt = message.getNode('EVN-2');
var path = '\\centtjsdmt2\\g$\\Path Group Reports\\' + mrn + ' - ' + evntdt + '.pdf';
//var newFile = new java.io.File(path);
var newFile = new NetFile(path, 'USERNAME', 'PASSWORD');
newFile.createNewFile();
qie.info(newFile);
// stream the bytes to the file
var out = new java.io.FileOutputStream(newFile, false);
out.write(obx5Decoded);
out.close();
message.setNode('MSH-10', StringUtils.substring(message.getNode('MSH-10'), 0, 20));
message.setNode('OBX-2', 'ST');
message.setNode('OBX-3', 'IMAGE_REF');
message.setNode('OBX-5', path + '^External Document');
Thanks,
Jonathan