Tuesday, April 2, 2019

How to filter the grid based on the control value in X++

Under data source Execute Query we can pass the Query range with the control value as mentioned below

public void executeQuery()
{
    this.query().dataSourceTable(tableNum(CICVendorCustomerCreation)).addRange(fieldNum(CICVendorCustomerCreation, CustomerCreated)).value(SysQuery::value(CustomerCreated.value()));
    super();
}

On control modified we can call the data source execute query as mentioned below

public boolean modified()
{
    boolean ret;
    CICVendorCustomerCreation_DS.query().dataSourceTable(tableNum(CICVendorCustomerCreation)).clearRanges();
    CICVendorCustomerCreation_DS.executeQuery();
    ret = super();
    return ret;
}

1 comment:

  1. Thanks for sharing this informative content , Great work
    Leanpitch provides online training in Enterprise agile coaching during this lockdown period everyone can use it wisely.
    Enterprise agile coaching

    ReplyDelete

How to enable the dimension fields based on the Item selected on the form.

[Form] public class KMTShipFromWarehouses extends FormRun {     InventDimCtrl_Frm_EditDimensions        inventDimFormSetup;     /// &l...