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())
                              );

    }

  • 相关阅读:
    MDA模型定义及扩展
    java中 i = i++和 j = i++ 的区别
    nginx+tomcat负载均衡和session复制
    HDU 4010.Query on The Trees 解题报告
    codeforces 165D.Beard Graph 解题报告
    zoj 3209.Treasure Map(DLX精确覆盖)
    hdu 1155 Bungee Jumping
    选择Nginx的理由
    九九乘法表
    K
  • 原文地址:https://www.cnblogs.com/Fandyx/p/1819346.html
Copyright © 2011-2022 走看看