web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :

Get the last inserted record from table using x++

Moeen Ahmed Sultan Profile Picture Moeen Ahmed Sultan 1,402

In Microsoft Dynamics 365 for Finance and Operations and Microsoft Dynamics AX 2012, if you want to get the last inserted record form table using X++. You need to order the records as descending by RecId.

RecId is the unique value stored with every row in every table in Microsoft Dynamics 365 for Finance and Operations and Microsoft Dynamics AX 2012 and often known as RecId. So, if we use the ORDER BY clause and use DESC keyword, it will sort the table in descending order by field you use. So, in this case we will use RecId field because it is unique and incremental in nature.

I have shared the code on my GitHub repository. Please download the code to get the last inserted record from table using X++ and use it as per your requirement.

Blog: Click here

YouTube: Click here

GitHub: Click here

Big dreams have small beginnings.

The post Get the last inserted record from table using x++ appeared first on NevoiTech Blog.

Comments

*This post is locked for comments