简体   繁体   中英

How to filter language field in Dynamics AX?

I'm trying to filter the table by the field "LanguageId" to show only "fr". I made a new method in my form datasource Here is my code

    public void filtr()
{
    DirPartyTable _dirPartyTable;
    select LanguageId from _dirPartytable
       where _dirPartyTable.LanguageId == "fr";
}

When running this code nothing happens. How to invoke it to work?

您可以覆盖DirPartyTable数据源的init方法,并添加以下代码以在languageId上添加值“ fr”的范围:

SysQuery::findOrCreateRange(this.query().dataSourceTable(tableNum(DirPartyTable)), fieldNum(DirPartyTable, LanguageId)).value("fr");

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM