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,
From my perspective, the same suggestion still applied. You can also have a quick job to test same.
Regards,
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
dynamics365musings.com/.../
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) { ... }
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
André Arnaud de Cal... 683 Super User 2025 Season 2
CA Neeraj Kumar 620
Martin Dráb 563 Most Valuable Professional