테이블에서 메소드 목록을 얻는 방법은 무엇입니까?
-
08-07-2019 - |
문제
Microsoft Dynamics Ax에서 C#의 테이블에서 메소드 목록을 어떻게 얻습니까?
해결책
아래 x ++ 메소드는 테이블 이름을 매개 변수로 취하고 메소드의 배열 목록을 반환합니다. C# 코드에서 x ++ static metods를 호출 할 수 있습니다 (이를 위해 .NET 비즈니스 커넥터가 필요합니다).
public static System.Collections.ArrayList getTableMethods(str _tableName)
{
SysDictTable sdt;
TreeNode tn;
TableId tableId;
MethodInfo methodInfo;
System.Collections.ArrayList methodArr;
#AOT
;
tableId = tableName2id(_tableName);
sdt = SysDictTable::newTableId(tableid);
methodArr = new System.Collections.ArrayList();
tn = TreeNode::findNode(#TablesPath + "\\" + _tableName + "\\" + "Methods");
tn = tn.AOTfirstChild();
while(tn)
{
methodArr.Add(tn.AOTname());
tn = tn.AOTnextSibling();
}
return methodArr;
}
제휴하지 않습니다 StackOverflow