How to use connull() in dynamics ax OR How to dispose 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.

connull :- Use connull to explicitly dispose of the contents of a container.

EX:- container conNull()

static void conNullExample(Args _arg)
{
    container c = ["item1", "item2", "item3"];
    ;
 
    print "Size of container is " + int2str(conLen(c));
    // Set the container to null.
    c = conNull(); 
    print "Size of container after conNull() is " + int2Str(conLen(c));
    pause;
}

Related Posts

Previous
Next Post »

Thanks for comments.....