Friday, 14 November 2014

Data method to get data from the table

Data method to get table data as lookup through data method

using System;
using System.Security.Permissions;
using Microsoft.Dynamics.Framework.Reports;
using Microsoft.Dynamics.AX.Application.Reports;
using System.Data;



using System.Collections.Generic;public partial class CustAgingReport
{
    [DataMethod(), PermissionSet(SecurityAction.Assert, Name = "FullTrust")]
    public static string DrillCustAccount(string reportContext, string custAccount)
    {
        return DrillThroughCommonHelper.ToCustomerForm(reportContext, custAccount);
    }

    [DataMethod(), PermissionSet(SecurityAction.Assert, Name = "FullTrust")]
    public static DataTable BillingClassLookup()
    {
      
        DataTable table = new DataTable();
        table = AxQuery.ExecuteQuery("select * from CustBillingClassification");
        return table;
       // throw new NotImplementedException("The method or operation is not implemented.");
    }
  
   
  

}

No comments:

Post a Comment