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
0
Answers
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?
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)
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? Thanks
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.