Mandatory Fields with header and line

hhhhhhhqathhhhhhhqat Member Posts: 111
i have field in header form ( "Posting Date") , i want to put restriction on this field , if the users not fill this value , they can't go and fill the sub form fields ,


is it possible to do like that .

Comments

  • AndwianAndwian Member Posts: 627
    If yours is Sales Order, there is the Dafault Posting Date in Sales & Receivable Setup.

    Set it to WORKDATE, instead of Blank.
    Regards,
    Andwian
  • hhhhhhhqathhhhhhhqat Member Posts: 111
    no , it;s customize forms , i need only to not allow the user to enter in records in form line before enter the posting date . because they can enter lines then modified the posting date if it's blank.

    thanks
  • matttraxmatttrax Member Posts: 2,309
    Why can they not change it after entering lines? You can write a function that gets called when you fill out the posting date on the header to copy that value to the lines if you need to.
  • hhhhhhhqathhhhhhhqat Member Posts: 111
    i am not familier yet with calling function,,,,
    can you give example , please
  • AndwianAndwian Member Posts: 627
    Line - OnInsert
    IF Header.GET("Document Type", "Document No.", "Line No.") THEN
      TESTFIELD(Header."Posting Date");
    
    Regards,
    Andwian
  • matttraxmatttrax Member Posts: 2,309
    Andwian wrote:
    Code: Select all
    Line - OnInsert
    IF Header.GET("Document Type", "Document No.", "Line No.") THEN
    TESTFIELD(Header."Posting Date");

    If I remember correctly that will actually throw you completely out of the open form. Not exactly the most user friendly solution.
  • kinekine Member Posts: 12,562
    matttrax wrote:
    Andwian wrote:
    Code: Select all
    Line - OnInsert
    IF Header.GET("Document Type", "Document No.", "Line No.") THEN
    TESTFIELD(Header."Posting Date");

    If I remember correctly that will actually throw you completely out of the open form. Not exactly the most user friendly solution.

    No when defined on the table. It will kick you out if it is on form...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • hhhhhhhqathhhhhhhqat Member Posts: 111
    now ok . thanks for all

    closed ;
Sign In or Register to comment.