一键导入
xppai-exportxpo
Use when you need to export a list of AX 2009 AOT objects to XPO files — generates a ready-to-paste X++ job given object names or full AOT paths.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when you need to export a list of AX 2009 AOT objects to XPO files — generates a ready-to-paste X++ job given object names or full AOT paths.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when analyzing X++ AX 2009 profiler traces, code stack traces, or execution paths to identify performance bottlenecks — repeated call chains, quadratic loops, expensive constructor+calc combos, excessive tax/totals recalculation, or deep framework cascades.
Use when reviewing X++ or general ERP source code for architectural weaknesses, design gaps, fragile sequencing, responsibility mismatches, technical debt, or structural risks — not just syntax or performance issues.
Use when given any X++ AX 2009 artifact — stack trace, method, class, form XPO, posting code, or table — and you need a full structured multi-skill analysis applied automatically based on artifact type.
Use when proposing X++ AX 2009 code fixes for identified performance bottlenecks or behavioral bugs — minimal, production-safe changes that preserve business logic and fit ERP team review standards.
Use for all XppAI AX 2009 tasks as the canonical core baseline (architecture, language, lifecycle, hard constraints, and evidence labels).
Use when deep AX 2009 analysis is required (performance, posting, totals/tax, framework patterns, customization safety, and architecture judgment).
| name | xppai-exportxpo |
| description | Use when you need to export a list of AX 2009 AOT objects to XPO files — generates a ready-to-paste X++ job given object names or full AOT paths. |
Generate a ready-to-paste X++ static job to export a list of AX 2009 AOT objects to XPO files.
Provide a list of objects to export. Each object can be:
\Classes\SalesFormLetter)Class: SalesFormLetter or Table: SalesLine)The skill resolves paths using the built-in map below, generates a complete X++ job, and outputs it ready to paste into a new Job in MorphX.
Resolution rule: if input starts with \, use as-is. Otherwise look up the type keyword in this table and build \Prefix\Name.
| Type keyword | AOT prefix |
|---|---|
Class | \Classes |
Table | \Data Dictionary\Tables |
Map | \Data Dictionary\Maps |
View | \Data Dictionary\Views |
Enum | \Data Dictionary\Base Enums |
EDT | \Data Dictionary\Extended Data Types |
Form | \Forms |
Query | \Queries |
Report | \SSRS Reports\Reports |
Job | \Jobs |
Type: Name pairs are expanded using the map)exportPaths containerstatic void PapaiExportXPO(Args _args)
{
TreeNode treeNode;
FileIoPermission perm;
container exportPaths;
str exportFolder;
str objectPath;
str objectName;
str fileName;
int i;
int exported;
int failed;
;
exportFolder = @'C:\temp\xpo_export\';
// All objects to be exported
exportPaths = [
// [resolved paths inserted here]
];
exported = 0;
failed = 0;
for (i = 1; i <= conLen(exportPaths); i++)
{
objectPath = conPeek(exportPaths, i);
// Build filename from last segment of path
objectName = substr(objectPath, strFind(objectPath, '\\', strLen(objectPath), -strLen(objectPath)) + 1,
strLen(objectPath));
fileName = exportFolder + objectName + '.xpo';
treeNode = TreeNode::findNode(objectPath);
if (treeNode)
{
perm = new FileIoPermission(fileName, 'W');
perm.assert();
treeNode.treeNodeExport(fileName);
CodeAccessPermission::revertAssert();
info(strFmt("Exported: %1 → %2", objectPath, fileName));
exported++;
}
else
{
warning(strFmt("NOT FOUND in AOT: %1", objectPath));
failed++;
}
}
info(strFmt("Done. Exported: %1 | Not found: %2 | Folder: %3",
exported, failed, exportFolder));
}
The export folder is hardcoded to C:\temp\xpo_export\. Modify if needed before running the job in MorphX.
Input:
Class: SalesFormLetter
Table: SalesLine
\Classes\TaxSales
Map: LogMap
Output:
static void PapaiExportXPO(Args _args)
{
TreeNode treeNode;
FileIoPermission perm;
container exportPaths;
str exportFolder;
str objectPath;
str objectName;
str fileName;
int i;
int exported;
int failed;
;
exportFolder = @'C:\temp\xpo_export\';
// All objects to be exported
exportPaths = [
@'\Classes\SalesFormLetter',
@'\Data Dictionary\Tables\SalesLine',
@'\Classes\TaxSales',
@'\Data Dictionary\Maps\LogMap'
];
exported = 0;
failed = 0;
for (i = 1; i <= conLen(exportPaths); i++)
{
objectPath = conPeek(exportPaths, i);
// Build filename from last segment of path
objectName = substr(objectPath, strFind(objectPath, '\\', strLen(objectPath), -strLen(objectPath)) + 1,
strLen(objectPath));
fileName = exportFolder + objectName + '.xpo';
treeNode = TreeNode::findNode(objectPath);
if (treeNode)
{
perm = new FileIoPermission(fileName, 'W');
perm.assert();
treeNode.treeNodeExport(fileName);
CodeAccessPermission::revertAssert();
info(strFmt("Exported: %1 → %2", objectPath, fileName));
exported++;
}
else
{
warning(strFmt("NOT FOUND in AOT: %1", objectPath));
failed++;
}
}
info(strFmt("Done. Exported: %1 | Not found: %2 | Folder: %3",
exported, failed, exportFolder));
}