File.Open for Extension Development

julkifli33julkifli33 Member Posts: 1,073
Hi all,
i am using instream and outstream to import txt file.
how do I open file for this?
because it was said for extension development no longer user open and close.
Thanks
7qyp4btcsgkg.png

Answers

  • SanderDkSanderDk Member Posts: 497
    You cannot open file.
    You need to uploadintostream:
    https://docs.microsoft.com/en-us/dynamics-nav/uploadintostream-function--file-
    For help, do not use PM, use forum instead, perhaps other people have the same question, or better answers.
  • julkifli33julkifli33 Member Posts: 1,073
    edited 2019-09-03
    HI Sander,
    Thanks for the link
  • julkifli33julkifli33 Member Posts: 1,073
    edited 2019-09-19
    Hi..
    possible to import data from our local PC folder?
    planning to use jobqueue to import data in 1 of our folder.
    FileName := 'c:\SomeFile.txt';  
    UPLOADINTOSTREAM('Import','',' All Files (*.*)|*.*',FileName,NVInStream);
    

    it keep give me the file open dialog.
    actually i want it immediately import from the path that i provide
  • SanderDkSanderDk Member Posts: 497
    You cannot acces you local file system when using extension.
    Extension are build to the webclient, imagine if a website could Imagine if a website could acces you local file, that would be a big security risk.
    For help, do not use PM, use forum instead, perhaps other people have the same question, or better answers.
  • julkifli33julkifli33 Member Posts: 1,073
    Yeah I think so...
    a web browser does not allow direct file access.
    Thanks for the advise all
Sign In or Register to comment.