In this case filtering vendor invoice journals by creating an extension class in the form datasource - init() method
I'm trying to filter vendor invoices with USD currency code
[ExtensionOf(formDataSourceStr(vendinvoicejournal, VendInvoiceJour))]
final class VendInvoiceJournal_FormDS_Extension
{
public void init()
{
next init();
str formName = this.formRun().name();
str callerName = this.formRun().args().callerName();
if(formName == 'VendInvoiceJournal' && callerName == 'VendInvoiceJournal')
{
this.query().dataSourceName(this.name()).addRange(fieldnum(VendInvoiceJour, Currency)).value(SysQuery::valueLike("USD"));
}
}
}
No comments:
Post a Comment