All Files available automatically in Dataport File O

thetallbloke
Member Posts: 66
Hi all,
Is it possible to have the 'Files of type:' set to "All Files" automatically when the user selects a file on a dataport request form...???
As a proof of concept I wanted to incorporate a VB.Net DLL in Navision. so I created a DLL with a very simple method to accept an an Excel file name, convert it to CSV and save it in the same directory..
This allows my users who need to import data through a dataport to select an excel file, and run the dataport as if they'd selected a CSV file... they have no idea it gets converted and imported that way... I didn't really want them to go and convert files themselves or try to save them as CSV...
Every time they go to import a file however, they have to select "All Files" in the File Open dialog window... An easy step I know, but I'd like to make it easier for my users.
Thanks...
Is it possible to have the 'Files of type:' set to "All Files" automatically when the user selects a file on a dataport request form...???
As a proof of concept I wanted to incorporate a VB.Net DLL in Navision. so I created a DLL with a very simple method to accept an an Excel file name, convert it to CSV and save it in the same directory..
This allows my users who need to import data through a dataport to select an excel file, and run the dataport as if they'd selected a CSV file... they have no idea it gets converted and imported that way... I didn't really want them to go and convert files themselves or try to save them as CSV...
Every time they go to import a file however, they have to select "All Files" in the File Open dialog window... An easy step I know, but I'd like to make it easier for my users.
Thanks...
.
I'm not crazy !!! Just ask my toaster...
.
I'm not crazy !!! Just ask my toaster...
.
0
Answers
-
it's possible, if you modify the requ. Option form.
So, you must there insert your own Textbox and "OnAssistEdit()" Trigger you use the CommonDialogYourFilenameTxtVariable := CommDlgMgmt.OpenFile('DESCRIPTION','',4,'ALL (*.*)|*.*|CSV (*.csv)|*.csv|Text (*.txt)|*.txt',0);
Then in trigger Dataport - OnPreDataport() you type followingCurrDataport.FILENAME := YourFilenameTxtVariable;
RegardsDo you make it right, it works too!0 -
You can add your own Edit Box for selecting the file and using the CommonDialog codeunit to select the file. You can define own filter there...0
-
Brilliant... thanks for letting me know the Navision Way
Problem solved..
I'm not crazy !!! Just ask my toaster...
.0 -
Please.Do you make it right, it works too!0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions