how to link a structure with existing entities

my application has  a hierarchical table structure, i.e. parent table, child table, sub-child table.

when i was developing at first, i just pass the data using individual variable: 




Then i noticed that I should define a structure like the Json Objects from web services

Parent_Table_Records is a structure, Child_Table_List is inside the parent structure.

when i try, i can only manually define(copy/paste the entity into structure), but it is not linked to the entity, when i change the entity, i need to update the structure also.

is there a way to link the structure to entity?

when i pass the object from function inside a function inside another function, is it pass by reference like a list?  


For the First question, your problem is that you have a relationship of type 1:many (even if is only one element to another). You will always have to "manually", using cycles, to fill your structure (with lists and so on). There is no way to connect "directly" your structure with the entities, like in "fill the structures in a single step".

For the second question, only Record Lists (Lists), Binary and Object are passed by reference. The rest is copied.

Eduardo Jauch

Thank you very much for your responds. Is structure considered as a object?

Hi Linguo. 

No. The Object data type is used to communicate with extensions, basically.
But a list is passed by reference.. You can always create a list to store your structure and pass the list. 

Eduardo Jauch