Notifications
Announcements
No record found.
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
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.
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?
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.
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.
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.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 584 Most Valuable Professional
André Arnaud de Cal... 499 Super User 2025 Season 2
Sohaib Cheema 254 User Group Leader