file path

nicole
Member Posts: 25
hi everyone! i have a field in a form where user will need to input a directory path...or, the user can also click the assist button, then a window will pop out where he can select the path (similar to when you click a 'Save as' button in most applications, a window pops out from where the user select the path)...are there built-in functions for this?
thanks!...i hope someone can help
thanks!...i hope someone can help

0
Comments
-
There is a common dialog codeunit that you can use for this. I don't know the number off the top of my head.0
-
On the OnAssitEdit enter the following code....
gstrFileName := gmdlCommonDialog.OpenFile('My Directory',
'',
0,
'',
goptAction::Save);
IF gstrFileName <> '' THEN
"My Directory" := gstrFileName;
...where gstrFielName is a text variable, goptAction is an option with the values "Open,Save", and gmdlCommonDialog is codeunit 412 (Common Dialog Management).Lee Durrant
Tres Tria Limited0 -
Just a note on the common dialog, the cancel button will not return "cancel" to your code (you need to modify it, and only then cancel button will return an ugly error).
For example, if you use the "openfile" function to save a file, and you click cancel, the dialog will still return a path and filename(if it was filled in).
If you want the openfile to raise an error when the user clicks cancel then add the following line...
CommonDialogControl.CancelError := TRUE;
...but I did warn you, it's an ugly error, and you cannot customize it.
regards,
gus0 -
Although this is sometime ago, I just wrote an external function for finding a directory and returning the directory name (full path).
http://www.mibuso.com/dlinfo.asp?FileID=531Mark van der Meij,
http://home.casema.nl/mvandermeij0 -
Actually, I just uploaded a Navision Form that I made some days ago, it does the trick WITHOUT relying on external products AT ALL.
Have a check on the download page in a day or two when webmaster makes it ready.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