Tuesday, May 21, 2019

X++ code for Lookup parameter in SSRS report

private void lookupAgentBroker(FormStringControl _formStringControl)
{

     //Query                   query = new Query();
    //QueryBuildDataSource    qbds;
    //SysTableLookup          sysTableLookup;

    //sysTableLookup = sysTableLookup::newParameters(tableNum(CustTrans), _formStringControl);

    //sysTableLookup.addLookupfield(fieldNum(CustTrans, CICAgentBroker));
    //qbds = query.addDataSource(tableNum(CustTrans));

    //qbds.addGroupByField(fieldNum(CustTrans,CICAgentBroker));
    //qbds.orderMode(OrderMode::GroupBy);//To avoid duplicate lookup value

    //sysTableLookup.parmQuery(query);
    //sysTableLookup.parmUseLookupValue(false);
    //sysTableLookup.performFormLookup();
}

No comments:

Post a Comment

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

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