Hi,
How to add a custom filter on list or inquiry form in D365
Reference AX 2012
[DataSource]
class SalesLine
{
/// <summary>
///
/// </summary>
public void executeQuery()
{
QueryBuildRange QcustomerFilter;
QcustomerFilter = SysQuery::findOrCreateRange(SalesLine_q.datasourceTable(tableNum(SalesLine)),fieldNum(SalesLine,CustAccount));
FormRun element = this.formRun();
FormStringControl txtCustomerNumber= element.design(0).controlName("txtCustomerNumber");
if (txtCustomerNumber.text()!=””)
{
QcustomerFilter.value(queryValue(txtCustomerNumber.text()));
}
else
{
QcustomerFilter.value(SysQuery::valueUnlimited());
}
super();
}
}
How to add a custom filter on list or inquiry form in D365
Reference AX 2012
[DataSource]
class SalesLine
{
/// <summary>
///
/// </summary>
public void executeQuery()
{
QueryBuildRange QcustomerFilter;
QcustomerFilter = SysQuery::findOrCreateRange(SalesLine_q.datasourceTable(tableNum(SalesLine)),fieldNum(SalesLine,CustAccount));
FormRun element = this.formRun();
FormStringControl txtCustomerNumber= element.design(0).controlName("txtCustomerNumber");
if (txtCustomerNumber.text()!=””)
{
QcustomerFilter.value(queryValue(txtCustomerNumber.text()));
}
else
{
QcustomerFilter.value(SysQuery::valueUnlimited());
}
super();
}
}
Comments
Post a Comment