Thursday, March 7, 2013

use code to control Table field: allowEdit = Yes / No

when Person name order = manual, can edit the name,

when Person Name order = (other), can't edit.



1. copy the field name from design.
        example Design-> Tab -> Tab page-> Grid ->field  AvPatient_TestSJ_Name

2. set the field auto decraration = yes from design properties

3. use it to code:


if(AvPatient_TestSJ.PersonNameOrder == AvDirPersonNameOrder_TestSJ::Manual)
        AvPatient_TestSJ_Name.allowEdit(true);

    else

        AvPatient_TestSJ_Name.allowEdit(false);


Extral knowledge* if write in method modified, have to write again in method active.





2 comments:

Anonymous said...

geotorelxzp debt consolidation services
bill consolidation loans

Unknown said...

It can be wrote in one line:
AvPatient_TestSJ_Name.allowEdit(AvPatient_TestSJ.PersonNameOrder == AvDirPersonNameOrder_TestSJ::Manual);