Direct importing from file through codeunit

VesnaVesna Member Posts: 24
Hello,
I created the following codeunit:

MyDataport.IMPORT(FALSE) ;
MyDataport.FILENAME:='C:\Documents and Settings\bla-bla-bla.csv';
MyDataport.RUN;

When I click 'RUN' I see the window with two tabs 1. Importing table name, 2. Options.
Since I am going to assign this codeunit to Job Queue to import data every 30 min. I don't want this window to pop up when I click 'Run'.
In other words, I need to click only 'Run' button on my codeunit for importing the file.
Thank you very much

Comments

  • bbrownbbrown Member Posts: 3,268
    Set the Dataport's UseReqForm property to NO.
    There are no bugs - only undocumented features.
  • VesnaVesna Member Posts: 24
    Wow,
    That is exactly what I need.
    Thank you =D>
  • ara3nara3n Member Posts: 9,256
    NAS does not allow Dataports to run. You need to write your dataport to codeunit.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
Sign In or Register to comment.