Показать сообщение отдельно
Старый 29.05.2008, 17:05   #1  
Blog bot is offline
Blog bot
Участник
 
25,643 / 848 (80) +++++++
Регистрация: 28.10.2006
Kashperuk Ivan: EditorScripts.addIns_OpenInAOT - version 2
Источник: http://kashperuk.blogspot.com/2008/0...version-2.html
==============

A long time ago, I posted an editor script for opening objects selected in the editor in AOT (link to that post)

Yesterday, miklenew from AxForum posted an editor script for AX 3.0 that opens a new AOT window with the object currently selected in the Editor, that works a little differently and also allows to open objects based on variable type. You can view the original post here.

Today I modified this code, extending it a bit and adding support for Dynamics AX 4.0 and Dynamics AX 2009 (For version 3.0 use the code posted on AxForum).

public void addIns_OpenInAOT(Editor e)
{
#AOT
TreeNode treeNode = TreeNode::findNode(e.path());
xRefTmpReferences xRefTmpReferences;
Column nCol = e.columnNo() + 1;
Line nLine = e.currentLineNo() + 1;
;
treeNode.AOTmakeXref(1);
xRefTmpReferences = xRefCreate::makeTmp(infolog.lastxRef());

select firstonly xRefTmpReferences
order by Column desc
where xRefTmpReferences.line == nLine &&
xRefTmpReferences.Column <span style="color:#808030;">
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.