Avoid the Duplicate records
public boolean validateWrite()
{
boolean ret;
SendersEmailAddress sendersEmailAddress,senderEmailAddresslocal;
ret = super();
select firstonly senderEmailAddresslocal
where senderEmailAddresslocal.Country == this.Country
&& senderEmailAddresslocal.CustGroup == this.CustGroup
&& senderEmailAddresslocal.SalesOrigin == this.SalesOrigin
&& senderEmailAddresslocal.Site == this.Site
&& senderEmailAddresslocal.RecId != this.RecId;
if(senderEmailAddresslocal)
{
throw error(“@AAF1239”);
}
return ret;
}
Comments
Post a Comment