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

    }

  • 相关阅读:
    .NET框架设计—常被忽视的C#设计技巧
    判断网络是否链接
    ADO.NET入门教程(五) 细说数据库连接池
    爬虫selenium中截图
    爬虫极滑块验证思路
    Linux 磁盘分区、挂载
    linux中crontab任务调度
    第30课 操作符重载的概念
    第29课 类中的函数重载
    第28课 友元的尴尬能力
  • 原文地址:https://www.cnblogs.com/Fandyx/p/1819346.html
Copyright © 2011-2022 走看看