Announcements
i have 3 lines of data in my form form having two data sources one is pricedisctable,inventdim.
in that form customer ALMT-000001 having 2 lines and ALMT-000002 having one line if i open
a form it should show latest transaction customer wise based on fromdate means ALMT-000001 should show only line that is 7/10/2017
my quastion is in that form two data sources are there which data source i need to write excutequery method
thanks in advance....
*This post is locked for comments
Hi Karthik,
I understand that you don't know where override the executeQuery(). I recommend you override the method in the main table datasource, for example, if you have CustTable and SalesTable and you want filter by AccountNum, the method would be in CustTable datasource and your code like this:
public void executeQuery()
{
this.query().dataSourceTable(tableNum("CustTable")).addRange(fieldNum(CustTable, AccountNum)).value(AccountNumParameter);
qbr = this.query().dataSourceTable(tableNum("CustTable")).addRange(fieldNum(CustTable, AccountNum));
qbr.value(queryValue(AccountNumParameter));
super();
}
hi Mr.Chaitanya still i didnt apply ur logic once i have done ill let you know....
Hi,
Could you please try the answers suggested on your other open thread on the same issue.
https://community.dynamics.com/ax/f/33/t/242983
Thanks,
Chaitanya Golla
no if i open a form it should show filtered records.
Answer to your this question - which data source i need to write excutequery method
You should find which data source has that date column and use that.
Hi Karthik143,
This seems you want to filter when selecting the record, isn't it?
This seems to be a duplicate of how can i filter latest data through x++ query. Please don't create multiple threads about the same things; continue in your original one. You've got some suggestions there and you didn't say that they don't work for you and why, so it should likely be your next step.
André Arnaud de Cal...
294,217
Super User 2025 Season 1
Martin Dráb
232,978
Most Valuable Professional
nmaenpaa
101,158
Moderator