How to make a control not editable or not visible!!!!

HanenHanen Member Posts: 281
edited 2009-11-03 in NAV Three Tier
Hello,

I've tried to make my controls not visible or not editable but it didn't work :oops:
IF "VAT Bus. Posting Group" = 'EXONERE'  THEN BEGIN
   CurrPage."Attestation".EDITABLE := TRUE;
 END ELSE BEGIN
   CurrPage."Attestation".EDITABLE := FALSE;
END;

Please help!!!!!
Regards

Hanen TALBI

Comments

  • andyRandyR Member Posts: 27
    HI,

    it is possible to insert a bool Variable into the property Editable (for actions, fields...etc).

    Example:

    You want to switch the field with the name "my_field" editable/not editable.
    So the first thing is to create a global bool variable (my_field_is_editable) -> screenshot1.
    Go into the properties of this variable and set the property "IncludeinDataset" to yes (this is neccessary) -> screenshot2. After this process you are able to use this variable in the Enable- Property Screenshot 3+4.
    In CAL code you now have only switch the variable to true/false. The field will be switch to the value of the variable.

    Screenshot 1:
    var.gif


    Screenshot 2:
    var_prop.gif


    Screenshot 3:
    field_property.gif


    Screenshot 4:
    hmm welll only 3 attachments possibel?!?
    Go to the field--> Properties->Enabled and insert your variable. It is working for the property "visible" also.

    i hope it helps, Andy
  • andyRandyR Member Posts: 27
    Yeah, almost so good like my explanation :D:D:D
  • HanenHanen Member Posts: 281
    Thaaaaaaaaaaaaaaaaaaaaaaaanks, it works \:D/
    Regards

    Hanen TALBI
Sign In or Register to comment.