Dataport and Request Form
SYLV1G
Member Posts: 93
Hello
If i add a new control on the request form of a dataport the default controls Filename and Direction are not visible any more.
How can i do to show this controls again ?
Thanks in advance
If i add a new control on the request form of a dataport the default controls Filename and Direction are not visible any more.
How can i do to show this controls again ?
Thanks in advance
0
Comments
-
You need to add your own browse box if you modify the request form.
This is easily done using a text box and calls to the Common Dialog Management codeunit (412).0 -
Ok thank you !0
-
You can find the solution for this problem at the german-speaking site
http://www.navision24.de/tutorials/request-form-eines-dataports-selbst-gestalten.html
(Thanks Mark Teuber for the trick)
- create two new global variables ("Filename” / „Import” )
- open the request form
- insert a textbox (Property ID = 1 / AssistEdit = Yes / SourceExpr = Filename / Label for textbox ParentControl = 1
- insert a radiobutton Import (SourceExpr = Import / OptionValue = True
- insert a radiobutton Export (SourceExpr = Import / OptionValue = False
- insert on the OnPreDataport-Trigger this code
CurrDataport.IMPORT(Import);
CurrDataport.FILENAME(Filename);
Regards
Christian0 -
Hello,
I knew about the <filename> controls needed to be designated as control n° 1 and it works but I can't manage to get the import/export radio changing dynamically the behaviour of dataport property, thus making impossible to use the filename dialog box for either an import or an export. Can you tell me if something is missing??
Sorry to ask but I can't read German...
Be blessed for your answer [-o<
Best Regards
Denis0 -
Hi,
Adding to what cmueller wrote earlier. To dynamically control import/export of a dataport, have a global variable (you could call it "Direction") declared as an option with the values "import" and "export". In the radiobuttons' properties you set their correct option value. Then, in your C/AL code, test to see which value has been selected by the end user and then set the import function accordingly.IF Direction = Direction::Import THEN CurrDataport.IMPORT(TRUE) ELSE CurrDataport.IMPORT(FALSE);
As cmueller already wrote, this code should be in your OnPreDataport-Trigger.
I hope this solves your problem.
Cheers!0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions