Thursday, January 5, 2017

jQuery Popup



Tuesday, August 23, 2016

Dynamics AX - The value 1 is not found in the map

Issue Resolved. The problem was in the progress bar. The workaround is to use the SetTotal(someinteger) method instead of the incCount() method .

Monday, August 8, 2016

Ferranti DateTime Conversion to Date

Ferranti  DateTime Conversion to Date

IIF (b.bilstartdate = '0','0',CONVERT(VARCHAR(12),DATEADD(day, -2, (36526+(LEFT( b.bilstartdate + 288000000000,11)-63082281600)/(24*3600))),5) )as startdate

Thursday, August 4, 2016

Executing SQL Query in Dynamics AX

X++ language supports a number of ways to execute native SQL against any SQL data source.

Note: don't forget to set RunOn Property to Server of the class. Job:

static void BillingQuery(Args _args)
    RunSqlQuery q = new RunSqlQuery();



class RunSqlQuery

public void RunSqlQueryMethod()
     str sql;
    Connection conn;
    SqlStatementExecutePermission permission;
    Statement Stmt;
    ResultSet R;
    str result;
    sql = "select ACCOUNTNUM from custTable";

    conn = new Connection();
    permission = new SqlStatementExecutePermission(sql);

    Stmt = conn.createStatement();
    R = Stmt.executeQuery(sql);
    while ( )
        result =  R.getString(1);

    // the permissions needs to be reverted back to original condition.

Below the useful links.

Wednesday, August 3, 2016

Time elapsed functions in AX 2012

The below links will have good examples of how to know time elapsed by a process in AX 2012,

This is needed sometime when you want to do some performance tuning of a method/ query.

Please refer the below links for more details