error AL0296. Need File Management, RapidStart Config Package Mgmt, CSV Buffer LoadData Methods External
V1 blocking issues for our Data Migrator:
- error AL0296: The type or method 'InsertPackageField' cannot be used for 'Extension' development. (CU 8611 "Config. Package Management")
- error AL0296: The type or method 'ApplyPackage' cannot be used for 'Extension' development. (CU 8611 "Config. Package Management")
- error AL0296: The type or method 'UploadFile' cannot be used for 'Extension' development. (CU 419 “File Management”)
- error AL0296: The type or method 'LoadData' cannot be used for 'Extension' development. (table 1234 "CSV Buffer")
- error AL0296: The type or method 'RecordError' cannot be used for 'Extension' development.( 8611 "Config. Package Management")
If refactoring, please try to keep the method signature in sync if possible.
Unfortunately, I cannot expose UploadFile, as files aren't supported in V2 extensions. Instead, you will have to use file streams. This is also true for LoadData; I will add a function to load data from stream, which should do the trick. Your remaining 3 requests have been addressed.
I can read text from the Instream Object that I pass to your LoadDataFromStream function. However, your first check in your ReadLines function (StreamReader.EndOfStream) returns true so the function exits and no data is processed.
I am using the UpLoadIntoStream function to create the Instream object.
-- from Table 1234...
LoadDataFromStream(CSVInStream : InStream;CSVFieldSeparator : Text) InitializeReaderFromStream(CSVInStream,CSVFieldSeparator); ReadLines(0); StreamReader.Close;
-- ReadLines(NumberOfLines : Integer) : Boolean IF StreamReader.EndOfStream THEN EXIT(FALSE); ...
Hi,
I did not manage to repro your issue. Here is the code I used to try to repro:
local procedure TestCSV()
var
MyInStream : InStream;
UploadResult : Boolean;
TempBlob : Record TempBlob;
DialogCaption : Text;
Name : Text;
CSVBuffer: Record "CSV Buffer";
begin
UploadResult := UploadIntoStream(DialogCaption,'','',Name,MyInStream);
CSVBuffer.DeleteAll;
CSVBuffer.LoadDataFromStream(MyInStream,';');
Message('%1 contains %2 lines.', Name, Format(CSVBuffer.Count));
end;

Maybe you are reading the stream twice and the second time, it fails because it is already at the end of the stream?
David, Jesper, Because I copied the stream before I called the LoadDataFromStream, it moved the pointer to EOS. I was able to track this down immediately after reading your suggestions. Thanks again to both of you for your help.
CopyStream(OutStream,locInstream); //evidently sets locInstream.EOS := true TempCSVBuffer.LoadDataFromStream(locInStream,Tab);
Stanislaw - why reopen?
February update hasn't shipped yet. We only close fixes once they are publicly available.
ok thanks.