Hi everyone,
I have the following code:
Solution (1):
1-1: List purchRFQVendLinkList = new List( tableNum( PurchRFQVendLink ) );
1-2: while select purchRFQVendLinkLocal
where purchRFQVendLinkLocal.RFQCaseId == purchRFQCaseTableLocal.RFQCaseId
{
purchRFQVendLinkList.addEnd(purchRFQVendLinkLocal);
}
Then, I have an error dialog which says the ‘The type is not as expected’;
If I change to
Solution (2):
2-1: List purchRFQVendLinkList = new List(Types::String);
2-2: while select VendAccount from purchRFQVendLinkLocal
where purchRFQVendLinkLocal.RFQCaseId == purchRFQCaseTableLocal.RFQCaseId
{
purchRFQVendLinkList.addEnd(purchRFQVendLinkLocal.VendAccount);
}
It works fine.
So, I am wondering why solution (1) cannot work, the declaration of 1-1 is not right? I know “List” in AX can contain any type of X++ object, right? It’s a little weird to me now.
Thank you,
Kwen