Skip to main content

Posts

Showing posts with the label ax containers

What are difference between temporary tables and containers in MSDAX

What are difference between temporary tables and containers -> Data in containers are stored and retrieved sequentially, but a temporary table enables you to define indexes to speed up data retrieval. ->Containers provide slower data access if you are working with many records. However, if you are working with only a few records, use a container. -> When you pass a temporary table into a method call, it is passed by reference. Containers are passed by value. i-> When a variable is passed by reference, only a pointer to the object is passed into the method. When a variable is passed by value, a new copy of the variable is passed into the method. If the computer has a limited amount of memory, it might start swapping memory to disk, slowing down application execution. When you pass a variable into a method, a temporary table may provide better performance than a container

Container functions in Dynamics Axapta

static void Datatypes_container_functions(Args _args) { container con; ; // conins - Insert values to the container con = conins(con, 1, "Toyota"); con = conins(con, 2, 20); con = conins(con, 3, 2200.20); con = conins(con, 4, "BMW"); con = conins(con, 5, 12); con = conins(con, 6, 3210.44); // condel - Delete the third and the fourth element // from the container con = condel(con, 3, 2); // conpeek - Read values from the container info(conpeek(con,1)); info(conpeek(con,2)); info(conpeek(con,3)); info(conpeek(con,4)); // connull - Reset the container con = connull(); // conlen - Get the length of the container info(strfmt("Length: %1",conlen(con))); }