How can we pass range in lookup of User control in EP (AX 2012) based on selection of another lookup?

Hi all,

I want to create 1 user control who’s having two fields called customer group and custAccount.

In that user control if I select any particular user group from GroupID lookup then on the basis of my selection the Custaccount lookup should filter.

How can I achieve this?

If any one is having idea about this then please share it.

Hi,

I am also finding for similar kind of solution, If u got solution for that, please share it it would me much helpful for me.

Thank you,

JK Reddy,

SD EP.Net

In the AOT Data Set node, you can override the dataSetLookup method of the field CustAccountId in the data source and the display list account id based on selection from custgroupid. Something like below code…

void dataSetLookup(SysDataSetLookup sysDataSetLookup)
{

List list;
Query query;

args = new Args();

list = new List(Types::String);

list.addEnd(fieldstr(CustAccount, CustAccountId));

sysDataSetLookup.parmLookupFields(list);

sysDataSetLookup.parmSelectField(‘CustAccountId’);

sysDataSetLookup.parmQuery().dataSourceNo(1).addRange( fieldnum(CustAccount,CustGroupId)).value(queryValue(custGroup.CustGroupId));

}

Hope this will help.

Hi suvarna_kumar ,

Thanks for u r help regarding ranges, i have some other requirement to pass range like in ax rich client, we created a criteria form which will create criteria to requested by user, here we are calling hcmworker query to fill others users in our custom workers table, can i create setup screen in enterprsie portal which can call query for inserting the users between like 00012…00017 like what we do in ax rich client.

warm regards,

JK Reddy

Hello,

Can you please give me the example to understand the problem. From you question I am not able to understand the sequence. Do you want to fill the lookup in EP based on query from AX Client, criteria. Please provide details.

Regards,

Suvarna.

Hi,

I have one Setup Form which is already there in ax rich client, i am developing that screen in enterprise portal, in that Form they have fields like eg: requestid, requestedby(currentworker) and requestdate and there one button with name criteria, when i click on criteria button i am getting query screen of hcmworker table, Here if i select the Derived table as Worker and field as Personnel Number and Criteria as between like 0009…00018, then they are fillling the range values between 0009…00018 in one temp table with that current worker.

i am researching that in enterprise portal i don’t know how to get query screen in the enterprise portal how to define the range of values.

if it not clear please reply me, i will be more elaborate

regards,

JK Reddy

Hi,

Greeting for the day,

I am trying to develop the query screen in enterprise portal like in ax client, can anyone come across this please provide me some suggestions.

Regards,

JK