Hi experts,
Fred Shen: Always use recId to know if a select statement returns a record - DAX Blogs - AXForum
Is this still true in Dynamics 365 FO? Can we use other fields or just as simple as (!custtable)?
Thanks,
Hi Yuji,
You already got correct answers above. An additional thought from my side.
The last example in the blog you shared, containing the count statement, does not look right to me. When you need a count, you never would check if the table or RecID exists. Then you just take the result set to get the count which can be zero as well. Anyway, also here you can use the RecId field to get the count.
select count(RecId) from purchTable where purchTable.purchId == "Do not exist"; info(strFmt("Total count: %1", purchTable.RecId); if (purchTable.RecId) { ... }
Hi Yuji, It's still applicable in D365 F&O. However, Field list should be used in select statement for better performance.
Check this article
Hi Yuji,
From my perspective, the same suggestion still applied. You can also have a quick job to test same.
Regards,
André Arnaud de Cal...
292,031
Super User 2025 Season 1
Martin Dráb
230,868
Most Valuable Professional
nmaenpaa
101,156