Date Input Dialogue Box

doddwelldoddwell 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

Best Answer

Answers

  • doddwelldoddwell Member Posts: 65
    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? Thanks
  • KishormKishorm Member Posts: 921
    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)
  • doddwelldoddwell Member Posts: 65
    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? Thanks
  • KishormKishorm Member Posts: 921
    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.
  • doddwelldoddwell Member Posts: 65
    Perfect. Thanks.
Sign In or Register to comment.