Hi JustZM,
The dimOf function is intended for X++ arrays that are declared as the following X++ primitive types: Boolean, date, int, int64, real, utcDateTime.
An example is int iAmounts[6];. Arrays of enumeration values and extended data types are also supported if they are ultimately based on one of the preceding primitive data types (such as int). The dimOf function doesn't accept arrays of all X++ primitive types. Here are the array types that the dimOf function doesn't accept: str, container, anytype, Arrays of class objects, Instances of the Array class.
Please refer this link for more some examples: docs.microsoft.com/.../xpp-reflection-run-time-functions
You can use lastIndex() to get the size of the array.