By dsandor at July 16, 2009 23:59
Filed Under:
Here is a really simple error / solution. I came back to writing X++ after a few weeks of down time and actually forgot about this as I am predominately a C# programmer.
The problem:
Axapta does not want you to use an unbounded string in a where clause.
The solution:
You must use a ‘bounded’ string. To do this you must declare your string with a numerical limiter e.g. str 30.
Example:
PurchTable getFirstByCustomerPOId(str 30 customerPOId)
{
PurchTable purchTable;
;
purchTable.selectForUpdate(true);
select firstonly purchTable
where purchTable.My_CustomerPurchaseOrderId == customerPOId;
return purchTable;
}
a42e4cbd-ca8f-4b8c-b496-d0dd02828a1f|1|5.0
Tags: