Insert in container in dynamics ax

Description:-
 
In this Article we will see about container in ax. There are more functionality in container to do in ax it’s like array to store data in container and read it from container. A container can be stored in the database as a dataBasecoloumn created through AOT especially used to store images/files as a blob. For example assignment of a container to another container variable and container functions such as conIns(), conDel(), conPoke(), += etc. are actually creating a new copy of the container. Here is the demo Example of container in Ax.
 
conins :-  Use conins to insert some items into a container.
EX:- container conIns (container container ,int start ,anytype element,... )

static void conInsExample(Args _arg)
{
    container c;
    int i;
    ;
    c = conIns(c,1,"item1"); 
    c = conIns(c,2,"item2");
    for (i = 1 ; i <= conLen(c) ; i++) 
    {
    // Prints the content of a container.
        print conPeek(c, i);
    }
    pause;
}

Related Posts

Previous
Next Post »

Thanks for comments.....