Modify Styles in Office 2007 Sunday, Apr 19 2009 

I was really unfamiliar with office 2007 because some of menu look disappear. One of it is how to modify styles, finally I’ve found it by pressing Ctrl+Shift+S 😉

My Smart Speed Test Saturday, Feb 7 2009 

huuum, lama mau test speed dari Smart EVDO saya, di rumah saya (karang tengah), saya dapat 4 sinyal EVDO yang artinya full sinyal 🙂 dan Alhamdulillah speed yang saya dapet tinggi juga 🙂

Get Standard Information in AX Monday, Jan 19 2009 

What I mean by standard function is, how to get logon user Id, default date or default datetime. I found it little bit hard, so that I’ll post it to make me easier to search

/*get the default user Id*/

curuserid()

/*get the default date */

today()

/*get the default date time*/

utcdatetime utc4, utcNow;

    ;

    utc4 = DateTimeUtil::utcNow();

    utcNow = DateTimeUtil ::applyTimeZoneOffset

        ( utc4,

        Timezone::GMTPLUS0700_BANGKOK_HANOI_JAKARTA

        );

Select query by using connection class Monday, Jan 19 2009 

query in standard Axapta is really limited because I can’t define distinct. Here is the code to define it, but as a note, you need to define it as a server run object.

public client server static void GetBatchListed( itemId _ItemId)

{

    Connection  conn;

    Statement   stmt;

    ResultSet   R;

    SqlStatementExecutePermission perm;

    str         sql;

    TSWrkInventBatch    TSWrkInventBatch;

    ;


    conn = new connection();

    stmt = conn.createStatement();


    sql = “select * from InventBatch IB inner join (“;

    sql += “select distinct c.InventBatchId from Inventsum a inner join InventDim b “;

    sql += “on a.Inventdimid = b.inventdimid “;

    sql += “inner join InventBatch c on b.InventBatchId = c.InventBatchId “;

    sql += “where a.ItemId = %1 and “;

    sql += “c.inventBatchId <> ”) as TBJoin on IB.InventBatchId = TBJoin.InventBatchId”;



    perm = new SqlStatementExecutePermission(strfmt(sql,_ItemId));

    perm.assert();

    R = Stmt.executeQuery(sql);


    while (R.next())

    {

        info( R.getString(fieldnum(InventBatch, InventBatchId)));

    }

}

Update in Axapta Thursday, Dec 11 2008 

I’ve learned axapta for 2 days and I found a wall while customized it :p
Actually, it’s really different with Solomon, you could not just select or update like sql script. Here’re the scripts:

ttsbegin;
while select forUpdate wmsorder where wmsorder.inventTransId == salesline.InventTransId
{
select * from inventtable where inventtable.ItemId == salesline.ItemId;

if (inventtable)
{
wmsorder.itemName = inventtable.itemName;
}
wmsorder.PortDest = salestable.Port;
wmsorder.doUpdate();
}
ttscommit;

ttsbegin and ttscommit are like tranbeg and tranend in Solomon. This code makes sure your table is in update condition, and the system will wait until your update process finish.

Happy Day Tuesday, Jul 29 2008 

Dan kubertanya..
Maukah kau terima..
Pinangan tanpaa..Sisa cinta yang lain

Rona bahagiaa, terpancar, dari anggukaan …
Saat kupasangkan..
Pasang cincin, di jemmarii…



Trima kasih kau terima..
pertunangan indah ini..
bahagia, meski mungkin, tak sebebas merpati..

Next Page »