Lookup Vendor account

Hi,

In EmplTable when i select the vendor Account no,no other employee should be able to select the same vendor account no.

for example,say in the Employee master for employee 1234,i select the vendor acc as “001_1245” … and for another employee 3422 …if i select the vendor account no as “001_1245” …it should prompt me a error msg saying “vendor already selected” .

how can i achieve this.

Regards,

Rajee

Hai Raji,

As said before, similar case here!!

you can override validate field method and put a validation on this field table level:

case fieldnum(empltable, vendacct):

select firstonly empltable where empltable.vendacct == this.vendacct;

if(empltable )

ret = checkfailed(“exists”);

break;

You can fix the Unique Index for that field

Thanks shon,it works fine.