Posts

RunBase class

Today I will provide you document in which I have mentioned how to define RunBase class in AX. RunBase Class

XDS Policy

Today I will provide you document in which I have mentioned how to restrict data according to user role by using XDS policy. XDS Policy Document XDS Policy XPO

CrossCompany and ChangeCompany in AX

Today I will demonstrate you that how to retrieve data from multiple companies or all companies by using CrossCompany and ChangeCompany in AX. CrossCompany:-  By using this keyword we can retrieve data from multiple companies or from all companies.                              Example:-                     CustTable cust;                     Container con;                     con=["ceu","Dat","cee"];                     Select crosscompany:con cust;                     print cust.accountnum;                     pause;                   Example...

Retrieve record from multiple table through Business Connector

Today I will demonstrate you that how to retrieve record from multiple table through Business Connector in AX. using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.Dynamics.BusinessConnectorNet; namespace testing { class Program { static void Main(string[] args) { try { Axapta ax = new Axapta(); ax.Logon("Cee", null, null, null); AxaptaRecord ar = ax.CreateAxaptaRecord("EmpPersonal"), axr = ax.CreateAxaptaRecord("EmpRecord"); ax.ExecuteStmt("select * from %1 join %2 where %1.EmpId==%2.EmpId", ar, axr); while (ar.Found) { Console.WriteLine("Empid: {0} EmpSal: {1}", ar.get_Field("EmpId"), axr.get_Field("EmpSal")); ar.Next(); } } catch (Exception ex) { Console.WriteLine(ex.Message); } Console.ReadLin...

Show user name in Client Startup

I will provide you document in which I have mentioned how to show user name at the time of client startup. User name as a startup message

Retrieve underlying SQL Query.

Today I will demonstrate you that how you can retrieve underlying SQL Query in AX. static void Sqlcodestatement(Args _args) { CustTable cust; select generateonly forceliterals cust where cust.AccountNum=="1102"; info(cust.getSQLStatement()); } generateonly:- is a keyword which allow you to find the underlying SQL query in X++ query statements.

Retrieve BaseEnum Value through code

Today I will demonstrate you that how to retrieve BaseEnum v alue through code in AX. static void RetreiveEnumValue(Args _args) { DictEnum denum; int i; denum=new DictEnum(enumName2Id("ABC")); for(i=0;i<denum.values();i++) { print denum.index2Label(i); print denum.index2Value(i); } pause; }