I guess there is a limitation in Axapta that you cannot declare or initialize list with multiple values like any other language. Here is a hack that you can do to initialize the list.
static void ListIntialization(Args _args)
{
str testString = "Hello1,Hello2,Hello3";
List testList = new List(Types::String);
ListIterator listIterator;
container testCon;
testCon = str2con(testString, ",");
testList = con2List(testCon);
listIterator = new ListIterator(testList);
while (listIterator.more())
{
info (strFmt("%1", listIterator.value()));
listIterator.next();
}
}
Image may be NSFW.
Clik here to view.

Clik here to view.
