I have 4 dataports I am running that exports to CSV. Is it possible to creat a form with a button which will automatically run all 4 dataports with the specified file output name and location.
Works fine... When I run it asks if I want to overwrite the CSV file that already exists (4 times), Can I get it to ignore this msg and overwrite all 4 csv's automatically?
Works fine... When I run it asks if I want to overwrite the CSV file that already exists (4 times), Can I get it to ignore this msg and overwrite all 4 csv's automatically?
Kind Regards
Within the AL code of the dataport within the "Dataport - OnInitDataport()" event add this command:
CurrFile.QUERYREPLACE(FALSE);
This will make the dataport not prompt for file replacement.
Comments
In the properties for the dataport you change
Import to No
FileName to the exact filename
On the cammandbutton you add the code
DATAPORT.RUN(DATAPORT::"Dataport # 1",FALSE);
DATAPORT.RUN(DATAPORT::"Dataport # 2",FALSE);
etc.
Works fine... When I run it asks if I want to overwrite the CSV file that already exists (4 times), Can I get it to ignore this msg and overwrite all 4 csv's automatically?
Kind Regards
Within the AL code of the dataport within the "Dataport - OnInitDataport()" event add this command:
CurrFile.QUERYREPLACE(FALSE);
This will make the dataport not prompt for file replacement.
Thanks for your help Guy's
Kind Regards
K Lewis