create edt with x++


I tried of looked how to create edt with x++

I write such code:

//treenode1.AOTadd(this.Kodu + “EDT_AGC”).applObjectType();


TreeNode t1,t2;
str s;

t1 = TreeNode::findNode(#ExtendedDataTypesPath);
t2 = t1.AOTaddSubNode(#NT_DBENUMTYPETYPE);
s = t2.AOTname();
print "A new EDT called " + s + " has been added to the AOT";


always take error like
""unable to create node"" ,how can solve this problem ,
Please help me 

you have done two posts

one is your are able to add an EDT by code and how to add properties to it…

then the next post is

you are unable to add an EDT…

what exactly you want…

Ok ,My english not very well so maybe I don t tell very well what I want to say =(

Now ,I want to create edt,when I write this code

treenode.AOTaddExtendedDataType(this.Kodu+ “EDT_AGC”,typeof(this.EDT_Tipi));

I take a error -->“AOTaddExtendedDataType(): Unsupported type specified.”

My senario: I create a table its field


when I insert new record,it create new EDT its name this.Kodu+“EDT”

then I access its properties and change its extend type -->this.EDT_tipi

then I create form and menuitem but I don’t do yet

When I write a job with same code its create EDT and change its extend type but I write it insert method it’s not create and give “AOTaddExtendedDataType(): Unsupported type specified.” error

I hope I will tell you :S

Sorry again,my english not verry well