Breaking news from around the world
Get the Bing + MSN extension
Now Available in Community - MBAS 2019 Presentation Videos
Catch the most popular sessions on demand and learn how Dynamics 365, Power BI, PowerApps, Microsoft Flow, and Excel are powering major transformations around the globe. | View Gallery
2019 release wave 2 Discover the latest updates to Dynamics 365Release overview guides and videos Release Plan | Early Access Availability
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Talent TechTalks | Upcoming TechTalks
I develop one Form with multiple data sources. I have data source called CustInvoiceTrans on my Form. I'm trying to filter the data with InvoiceDate(FromDate and ToDate). For that I use executeQuery() method with below logic and once filter values passed the button Clicked have following code. But My gird is not filtering. Please advice.
public void executeQuery() //on custinvoiceTran datasoucre
qbr1 = SysQuery::findOrCreateRange(this.query().dataSourceTable(tableNum(CustInvoiceTrans)), fieldNum(CustInvoiceTrans, InvoiceDate));
if (FromDateCtrl.dateValue() !=systemDateGet() && ToDateCtrl.dateValue() !=systemDateGet())
Your code looks fine to me. Is CustInvoiceTrans a root data source, or is it joined to another one? Is the grid bound to CustInvoiceTrans?
CustInvoiceTrans not root data source. Its linked with SalesTable. The values in grid From SalesTable, CustInvoiceTrans etc..
If they're joined, you should be working with executeQuery() of the root datasource, shouldn't you?
Thanks Martin. Now I can filter the grid. And I replace the && symbol in If condition. if (FromDateCtrl.dateValue() !=systemDateGet() || ToDateCtrl.dateValue() !=systemDateGet()).
Use qbr.value(strfmt(‘(FromDate<=%1)&& (ToDate>=%2)’,Date2StrXpp(d),Date2StrXpp(d)));
Dinkar, don't use this syntax unless absolutely necessary. It's difficult to read and write and compiler can't check your code inside the string; using SysQuery::range() is much better.
Business Applications communities