Using X++ code Customizations to statusLine

时间:2021-05-03 16:19:16
static void Jimmy_statusLine_CustomText(Args _args)
{
    str  6 msg;
    ;
    PRINT xSession::numSession();//对话数
    print Con2str(xSession::xppCallStack(),",");//当前的堆栈位置
    print Session::aosClientMode();//Thin

    msg = "Expire Date :"+date2str(xinfo::expireDate(),123,2,4,2,4,2);
    msg = " 谢宇帆";
    //Force the text to be shown
    xUserInfo::statusLine_CustomText(true);

    //infolog.
    infolog.writeCustomStatlineItem(msg);
    pause;

}

 

static void Jimmy_statuslineShowInstance()
{
//Display Dynamics AX 2009 Client's configuration and database name  in the status line
    str         sSQL;
    int         iDB;
    str         displayStr;
;

    sSQL = SqlSystem::databaseBackendDesc();//DGQVS004 - AX2009DEV
    iDB = strFind(sSQL, " - ", 2, strLen(sSQL)) + 3;//12

    if (iDB < strLen(sSQL))
        sSQL = subStr(sSQL, iDB, strLen(sSQL));//AX2009DEV

    displayStr = strFmt("%1%2", xInfo::configuration(), sSQL);//DEV2010,AX2009DEV
    print strlen(displayStr);//Only excepte str 16
    pause;
    xUserInfo::statusLine_CustomText(true);
    infolog.writeCustomStatlineItem(displayStr);
}