Date Input Dialogue Box

doddwell
Member Posts: 65
Hello
I have a Read-Only sub page that contains Customer Ledger Entries. I would like the users to be able to update
the Customer Ledger Entry "Due Date" by clicking an "Alter Due Date" Action button that then pops up an Input box with a date field (with Calendar).
What's the best approach in NAV2016?
Many Thanks
I have a Read-Only sub page that contains Customer Ledger Entries. I would like the users to be able to update
the Customer Ledger Entry "Due Date" by clicking an "Alter Due Date" Action button that then pops up an Input box with a date field (with Calendar).
What's the best approach in NAV2016?
Many Thanks
0
Best Answer
-
You can create a page to allow the user to enter a date, show the page modally (using RUNMODAL) and then get the date back from the page. Have a look at page 684 which is used to prompt for a date and a time - you could create something similar just for a date.
Having said that, you do know that users can edit the "Due Date" on the Customer Ledger Entries page directly as standard don't you?5
Answers
-
You can create a page to allow the user to enter a date, show the page modally (using RUNMODAL) and then get the date back from the page. Have a look at page 684 which is used to prompt for a date and a time - you could create something similar just for a date.
Having said that, you do know that users can edit the "Due Date" on the Customer Ledger Entries page directly as standard don't you?5 -
Thanks Kishorm. Yes - I know that the due date can be edited directly via the Customer Ledger Entries Page...but this would allow the user to alter other Customer Ledger Entry Data. I was thinking I could, alternatively, create a cut-down version of the Customer Ledger Entries Page and open that instead. Of the two options, which approach would you adopt? Thanks0
-
Be very careful on deciding what they should be able to change then you can make those fields editable - you'll also need to update CU 103 "Cust. Entry-Edit". You can do this on the standard "Customer Ledger Entries" page (my preference) or you could have a separate page if you want.
I would not make all field editable, just the ones that you actually need to edit. Think carefully above whether the fields should actually be editable or not (e.g. something like "Posting Date" should not be editable)0 -
Thanks Kishorm.
I only want Credit Supervisors to be able to alter the Due Date. So I have added some code to the Due Date OnValidate Trigger in the Cust Ledger Entry Table. The code checks if the user is a Credit Supervisor. Should this code be placed in CU 103 instead?
I had a play with the Date-Time Dialogue (created my own version) but couldn't work out how to get the Inputted date back from the Page. I was thinking I could create a new table "Date" and pass that to the Page.....but this would require that the Page has the same SourceTable of "Date". I can do this but noticed that the Standard object (ID 684) does not have a SourceTable Set. Perhaps you know of an example where the Date-Time Dialogue is being called? Thanks0 -
I would probably put in CU 103 but it's up to you really - you can put in OnValidate()
You get the date back by calling the GetDateTime function. Look at the LookupDateTime function in Table 472 "Job Queue Entry" to see how Page 684 is called/used.0 -
Perfect. Thanks.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