Intrinsic functions in queries
Views (1364)
The following code won't compile in AX.
select extCodeTable
where extCodeTable.ExtCodeTableId == tablenum(CompanyInfo)
join extCodeValueTable
where extCodeValueTable.ExtCodeId == extCodeTable.ExtCodeId;
The reason for that is the call to tablenum(CompanyInfo) - compiler doesn't not allow it inside queries. The simplest workaround is to define a variable, assign it with tablenum(CompanyInfo) value and use it in the query.
select extCodeTable
where extCodeTable.ExtCodeTableId == tablenum(CompanyInfo)
join extCodeValueTable
where extCodeValueTable.ExtCodeId == extCodeTable.ExtCodeId;
The reason for that is the call to tablenum(CompanyInfo) - compiler doesn't not allow it inside queries. The simplest workaround is to define a variable, assign it with tablenum(CompanyInfo) value and use it in the query.
This was originally posted here.

Like
Report
*This post is locked for comments