HiI'm working on a task where I need to get the outstream from XMLPort and pass it to the calling function. I wrote this code
however, I'm unable to do so. On first line it says that 'The type or method can not be used for extension development'.Is there any other way of creating outstream? Thanks in advance :)
Import and export a file in AL Extension can be handled with DOWNLOADFROMSTREAM and UPLOADINTOSTREAM functions.
The below code is a sample on how to export a blob data to a file:
PurchaseHeader.SETFILTER("No.","No.");TempBlob.Blob.CREATEOUTSTREAM(OStream);REPORT.SAVEAS(1322,PurchaseHeader.GETFILTERS,REPORTFORMAT::Pdf,OStream);TempBlob.Blob.CREATEINSTREAM(ReportInStream);MyPath := 'test.pdf';DOWNLOADFROMSTREAM(ReportInStream,'','', '',MyPath);
Is this method limited to work with using reports only?What if we need to write data to file in XML format?
No this method is native from the AL language so you can use as per your needs in every object.
I used your example and tailored it to my needs.
Using BC 365 and AL code.
I have the following
Business Applications communities