Hi All,
Is there any way that I can get the result into a file of compared AOT objects of two different layers?
Thanks,
Phani
Hi All,
Is there any way that I can get the result into a file of compared AOT objects of two different layers?
Thanks,
Phani
I'm sorry, I could help you with the development, but I don't have any already written code that I could give to you.
If I was you, I would start by reviewing the output if you compare layers manually. If the result is (roughly) what you want, then you can simply reuse the same logic. It's using classes like SysCompare and SysComparable, if I remember it correctly. I can't check it, because I don't work with AX 2012 anymore, but you can.
If the output isn't what you want, you need to consider your options. Maybe it's the right data, you just want a different visualization. Then you can keep the comparison logic and you'll merely change the output. Or maybe you need something completely different - then the question is what you actually want. One other option I can think of is exporting the objects to .xpo files and comparing these files by an external tool.
Hi Martin,
TreeNode sysVersion = SysTreeNode::findNodeInLayer(UtilElementType::Form, formStr(Accountant_BR), 0, UtilEntryLevel::sys);
TreeNode usrVersion = SysTreeNode::findNodeInLayer(UtilElementType::Form, formStr(Accountant_BR), 0, UtilEntryLevel::usr);
Now I have user level and sys level modified forms. I would like to use Syscompare class methods which gives the differences same like compare tool (compare,silentcompare of syscompare class which is suitable).
I am new to Ax2012 and x++ . so I have been asking for code snippet.
Thanks,
Phani
Unfortunately you didn't tell us where you got stuck, therefore it's not clear what code you're asking for.
I can only guess that you failed already on the first step. Try this:
TreeNode sysVersion = SysTreeNode::findNodeInLayer(UtilElementType::Form, formStr(Accountant_BR), 0, UtilEntryLevel::sys);
By the way, the fact that you know class and method names allows you to search for solutions both on internet and in AX.
Hi Martin,
Thanks for your reply.
I have a form Accountant_Br modified in usr layer and able to compare the same with sys layer and get the differences .
Same thing i want to achieve using code X++.
Could you please provide sample code if u can as explained above?
Thanks,
Phani
Exporting data to a file shouldn't be difficult, therefore I think you should focus on getting the differences.
I don't remember details of these APIs, but you should be able to extract implementation from a given layer with SysTreeNode::findNodeInLayer() and hopefully SysCompare can give you a output that would be useful for you.
André Arnaud de Cal...
293,202
Super User 2025 Season 1
Martin Dráb
231,923
Most Valuable Professional
nmaenpaa
101,156
Moderator