Struct.remove Method [AX 2012]
Removes an item from a struct.
The following example creates a struct with two items in it and prints a description of these items. One of the items is then removed by using the remove method.
{
Struct s = new Struct ("str name; int age");
// Values are assigned to the two items
s.value("name", "John");
s.value("age", 34);
// Prints a description of the items in the struct
print s.definitionString();
pause;
// Removes the name field
s.remove("name");
// Describes remaining items in the struct
print s.definitionString();
pause;
}
Community Additions
ADD
Show: