zoukankan      html  css  js  c++  java
  • Execute Client code on application startup in Dynamics AX 2009

    question
    I want to execute some client code on application startup. Where should I place this code?

    -->
    answer

    Modify \Classes\Info\startupPost() method for Axapta 3.0 or
    \Classes\Info\workspaceWindowCreated() for AX 4.0 and AX 2009.
    workspaceWindowCreated

     

    such as
    AOT - > Classes - > Info - >  workspaceWindowCreated()
    void workspaceWindowCreated(int _hWnd)
    {
        /**
            Put workspace window specific initialization here.
         -- Description: Show profile-name in the title bar
         Remark by Jimmy 2010-09-06
        */
        session     s = new Session();
        SysUserLog  SysUserLog;
        Str 25      IPAdress;
    ;

        IPAdress = SysUserLog::IPAdress(S.sessionId());
        ttsbegin;

        select firstonly forupdate SysUserLog
            order by SysUserLog.RecId desc
            where SysUserLog.UserId     == curuserid()
               && SysUserLog.SessionId  == s.sessionId();
        if(SysUserLog)
        {
            SysUserLog.IPAdress = IPAdress;
            SysUserLog.update();
        }
        ttscommit;

        WinAPI::setWindowText(_hWnd, strFmt("%1 - %2 - %3",
                              //xInfo::configuration(),
                              WinAPI::getWindowText(_hWnd),
                              IPAdress,
                              s.userId())
                              );

    }

  • 相关阅读:
    AT2364 Colorful Balls
    SP5973 SELTEAM
    codeforces469B
    校内题目T2691 桶哥的问题——送桶
    关于一种6的倍数判定素数的方法
    P1903 奖学金题解
    说说关于洛谷P4779迪杰斯特拉的堆优化
    清北学堂北京大学文宏宇神仙讲课day7
    CF961F k-substrings
    CF985F Isomorphic Strings
  • 原文地址:https://www.cnblogs.com/Fandyx/p/1819346.html
Copyright © 2011-2022 走看看