Quantcast
Viewing all articles
Browse latest Browse all 175888

Set mondatory field control

Hello ,

I added new field to VendTable named  "NumberTest"(String)  and to VendorGroup named "employee" (Enum :NoYesId). SO Here i want to set a mondatory control  to field "NumberTest", i want this field becomes mondatory when the vendor  is attached to vendorgroup and and the field named employee is on true (checked)

 So to that i created this function in VendTable :

Static public boolean ValidateNumberTest(){

VendorGroup       vdg;

select firstonly from vdg where  vdg.vendorGroup == this.vendorGroup

if(vdg.employee) return true 

else return false

}

And i add this code in  datasource of VendTable form  :

 //vendtable.NumberTest = mondatory(VendTable::ValidateNumberTest());

vendtable.object(fieldNum(vendtable,NumberTest)).mandatory(VendTable::ValidateNumberTest()
);


there is an erreur on my code specifically  in method active
Can anybody help in this regard

 


Viewing all articles
Browse latest Browse all 175888

Trending Articles