How to add Child to tree view structure of doctype

Hello guys. I have made a custom doctype to show tree view structure. I’m trying to add a child but am getting this error in the image below. how do I fix it?