AL icon indicating copy to clipboard operation
AL copied to clipboard

File datatype do not support OPEN,CREATEINSTREAM functions

Open rishiaurrishabh opened this issue 8 years ago • 1 comments

I am trying to use a Variable with datatype File, when I am using this variable to Open a file from a specific location AL is throwing an error : "message" : The type or method 'Open' cannot be used for 'Extension' development.

Code snippet : Var DataFile : File;

begin DataFile.Open(); end;

Note : same is happening with DataFile.CREATEINSTREAM and ourstream functions as well.

rishiaurrishabh avatar Jun 06 '18 11:06 rishiaurrishabh

Hi @rishiaurrishabh ! Are you developing for the Cloud or for OnPrem? Those methods cannot be used in extensions. This has been asked a couple of times: https://github.com/Microsoft/AL/search?q=cannot+be+used+for+%27Extension%27+development.&type=Issues . Please check the existing issues before opening a new one.

atoader avatar Jun 06 '18 12:06 atoader