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

    }

  • 相关阅读:
    PHP语句、函数及字符串处理
    JAVA代码 运算符
    utf-8
    ascii码对照表
    什么是数组
    教你如何---构建良好的windows程序(初学者必看) (转)
    代码
    Android课程---Android Studio简单设置
    Android课程---Android Studio使用小技巧:提取方法代码片段
    Android课程---Android Studio的一些小技巧
  • 原文地址:https://www.cnblogs.com/Fandyx/p/1819346.html
Copyright © 2011-2022 走看看