Nhat Duy
Nhat Duy

Reputation: 198

Dynamics ax 2012 Cannot sort data of reference group type field on grid

  1. I create a temporary table TmpTable(TradeAgreement)

  2. In Relations, I refer TradeAgreement field of TmpTable with RecId field of table TradeAgreementTable.

  3. I create a form TmpForm with datasource is TmpTable

     public class FormRun extends ObjectRun
     {
         TmpTable tmpTable;
     }
    
     public void init()
     {
         TradeAgreementTable tradeAgreement;
         super();
         while select tradeAgreement
         {
             tmpTable.clear();
             tmpTable.TradeAgreement = tradeAgreement.RecId;
             tmpTable.write();
         }
    
         TmpTable.setTmpData(tmpTable);
         TmpTable_ds.executeQuery();
     }
    
  4. I open TmpForm to see result and try to sort but nothing happens

Sort Ascending

Sort Descending

Upvotes: 1

Views: 817

Answers (1)

Exception e
Exception e

Reputation: 1874

Set you table type to TempDB and then your data can be filtered and sorted like regular tables.

Upvotes: 1

Related Questions