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

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

How to export a form to xpo file with what ever layer i want

(0) ShareShare
ReportReport
Posted on by

Hi All,

I would like to export any AOT node(eg:Form-Accountant_BR) to xpo file but through code (x++)  from different layers (usr,cus,sys) while exporting.

Thanks,

Phani

I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    236,353 Most Valuable Professional on at
    RE: How to export a form to xpo file with what ever layer i want

    Try something like this:

    #AOT
    TreeNode formNode = TreeNode::findNode(#FormsPath   #AOTDelimiter   formStr(Accountant_BR));
    treeNodeCus = treeNode.getNodeInLayer(UtilEntryLevel::cus);
    if (treeNodeCus)
    {
    	treeNodeCus.treeNodeExport(strFmt(@'c:\temp\%1%2.xpp', treeNode.AOTname(), UtilEntryLevel::cus));
    }

    By the way, why are you doing it?

  • Community Member Profile Picture
    on at
    RE: How to export a form to xpo file with what ever layer i want

    Hi Martin,

    I have tried the above code for usr layer and it gives the sys changes as well in that . Kindly help me

    Thanks,

    Phani

  • Martin Dráb Profile Picture
    236,353 Most Valuable Professional on at
    RE: How to export a form to xpo file with what ever layer i want

    Im sorry, I don't have any AX 2012 environment anymore, therefore I can't test it. But I believe that it should work. Make sure you call treeNodeExport() on treeNodeCus and not treeNode.

    If nothing helps, look at the standard code that handles exports from GUI.

  • ToddB Profile Picture
    on at
    RE: How to export a form to xpo file with what ever layer i want

    Hi Phani,

    Were you able to export using the information provided by Martin?

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

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

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 2,028

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 579 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans