Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / Dynamics AX training / How to create EDT from code

How to create EDT from code

VolodymyrMy Profile Picture VolodymyrMy 686

It is impossible to create EDT from X++ using standard AOTAdd. AOTCompile causes Axapta crash and than unstable work. AOTSave method virtually doesn’t save anything.

Solution: Use export/import methods.
Steps:

  1. Find any EDT node using AOT methods.
  2. Use SysTreeNode::CopyNode() to copy node to the new EDT node.
  3. Change properties according to the needs for the new node.
  4. Export new node EDT to temporary folder.
  5. Parse exported file and set USERTYPE property the same as NAME property.
  6. Import changed xpo file.

This was originally posted here.

Comments

*This post is locked for comments