public boolean validateWrite()
{
boolean ret;
ret = super();
// your validation
if()
{
ret = ...
}
if(!ret)
{
{{YourTable}}_ds.reread();
{{YourTable}}_ds.refresh();
{{YourTable}}_ds.research().
}
return ret;
}
YourDatasourceName_ds.reread();
YourDatasourceName_ds.rereadreferenceeDatasource();
YourDatasourceName_ds.research(true).
public boolean validateWrite()
{
boolean ret;
DTDMCHeaderLines dTDMCHeaderLinesInv = this.cursor();
select firstonly DTDMCHeaderLines
where DTDMCHeaderLines.InvoiceId == dTDMCHeaderLinesInv.InvoiceId;
if(DTDMCHeaderLines.RecId != 0)
{
throw error('InvoiceId Already Exist');
}
ret = super();
return ret;
}
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
Andre Arnaud de Cal... 283,281 Super User
Martin Dráb 223,017 Super User
nmaenpaa 101,140