This code is written in an extension class for VendOutPaym and is used during the vendor payment file generation process. An error occurs (subject) when generating the payment file by clicking "Generate payments" on the vendor payment journal form.
[XMLpath,XMLnameOfFile,XMLextention] = fileNameSplit(filename);
downloadUrl = File::SendFileToTempStore(file.getStream(), filename, classstr(PaymentFileTemporaryStorageStrategy), true);
System.IO.Stream stream = File::UseFileFromURL(downloadUrl);
newfilename = strFmt("%1\\%2",DMFParameters::find().SharedFolderPath,filename);
BinData bindata = new BinData();
Binary binaryData = Binary::constructFromMemoryStream(stream);
container containerData = binaryData.getContainer();
bindata.setData(containerData);
bindata.saveFile(newfilename);
This functionality has been working for 5 to 6 years since implementation by a partner, but it suddenly stopped working last weekend without any apparent cause - no recent deployment atleast around this area and issue happens almost after a month since the last deployment
The issue appears in SIT and PROD environments, but works fine in DEV. Debugging SIT using DEV tools was unsuccessful, since the problem happens at the Bindata.savefile call—which is managed code, so it's not accessible during debugging like Im not able to go inside savefile method.
The only difference identified is that DMFParameters.SharedFolderPath is set to a local path in DEV, whereas SIT and PROD use an Azure Blob path. Not sure, some azure blob related changes has affected this functionality
Any recommendations, suggestions, or insights into this problem would be greatly appreciated.Here’s a corrected version suitable for a community post:
Thanks
Uday