web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

How to get the output of compared aot objects for different layers?

(0) ShareShare
ReportReport
Posted on by

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 have the same question (0)
  • Martin Dráb Profile Picture
    237,880 Most Valuable Professional on at

    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.

  • Community Member Profile Picture
    on at

    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

  • Martin Dráb Profile Picture
    237,880 Most Valuable Professional on at

    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.

  • Community Member Profile Picture
    on at

    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

  • Martin Dráb Profile Picture
    237,880 Most Valuable Professional on at

    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.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 584 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 499 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 254 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans