disable and enable dropdown using value from header form

RathiRathi Member Posts: 51
edited 2016-11-01 in NAV Three Tier
Hi anyone knows, how to pass boolean data to subform data (item type) and make it editable or non-editable?

or any page using this concept so that i can refer..

Thanks

Best Answers

Answers

  • mohana_cse06mohana_cse06 Member Posts: 5,504
    or you can check in validate trigger of field "Item Type" whether header field is true or not.
    you can show error if requirement is not met..
  • KishormKishorm Member Posts: 921
    Try something like this...

    1) Create a Boolean in the subpage and set IncludeInDataset property to yes
    2) assign the Boolean variable to the Editable property of the "Item Type" field
    3) Create a global function in the subpage to allow you to set the Boolean variable to true or false
    4) Call the subpage function (CurrPage.lines.SetMyBoolean(...)) from the main page on the OnValidate of the field in the header and also in the OnAfterGetCurrentRecord trigger
  • RathiRathi Member Posts: 51
    @mohana_cse06 thanks, Yes i trigger the code at onvalidate field.

    Can anyone help me why my codes always return message for first condition only even though there are 2 scenarios tested?

    Returning --> MESSAGE(Text001)


    CASE GPOTender."Able to Quote" OF
    GPOTender."Able to Quote"::"1":
    BEGIN
    MESSAGE(Text001);
    END;
    GPOTender."Able to Quote"::"0":
    BEGIN
    MESSAGE(Text000);
    DisableLines;
    END;
    END;
  • mohana_cse06mohana_cse06 Member Posts: 5,504
  • RathiRathi Member Posts: 51
    Yeah.. i placed this codes at "onaftergetcurrrecord" and "able to quote-onvalidate"

    Is this correct?
  • RathiRathi Member Posts: 51
    It works like charm.. thanks guys <3:)
Sign In or Register to comment.