block form field for single reocrd


I want to block field ZipPostalCode if field ZipPostalCodeGroup is selected for only one record on form. I am using lookup on ZipPostalCode field. Can you show me code for it?

I think you should override active() method and put in there that if ZipPostalCodeGroup is selected, ZipPostalCode’s AllowEdit oraz Enable parameter is set to false.

no that will block the whole field for all the records

I have written code :

PdsMRCRestrictionList_DS.object(fieldNum(PdsMRCRestrictionList, ZipPostalCode)).allowEdit(false);

above code not blocking field ZipPostalCode.

Does any properties of field or anything need to be set??