Search This Blog

Container and unbounded string (text) fields are not allowed in a WHERE expression in AX.

Container and unbounded string (text) fields are not allowed in a WHERE expression in AX.

Error: Container and unbounded string (text) fields are not allowed in a WHERE expression in AX.

Reason: Axapta does not allow you to use an unbounded string in a where clause.

cont

Solution:

You must use a ‘bounded’ string. To do this you must declare your string with a numerical limiter e.g. str 50.


Example:

PurchTable getFirstByCustomerPOId(str 50 customerPOId)
{
PurchTable purchTable;
;
purchTable.selectForUpdate(true);
select firstonly purchTable
where purchTable.My_CustomerPurchaseOrderId == customerPOId;
return purchTable;
}


-Harry

2 comments:

  1. Thank you! Greetings from México

    ReplyDelete
  2. Hey Jose,
    You can join this blog to keep update with us...

    ReplyDelete

Thanks