Sometimes we get a requirement to get latest inserted record from a table in dynamics AX.
Below is an example code for that. Here, I used order by desc to get the latest record.
select firstfast salesTable order by CreatedDateTime desc where salesTable.CustAccount == custTable.AccountNum
&& salesTable.SalesType == SalesType::Sales
&& salesTable.SalesStatus != SalesStatus::Canceled;
@Rahul
Below is an example code for that. Here, I used order by desc to get the latest record.
select firstfast salesTable order by CreatedDateTime desc where salesTable.CustAccount == custTable.AccountNum
&& salesTable.SalesType == SalesType::Sales
&& salesTable.SalesStatus != SalesStatus::Canceled;
@Rahul
No comments:
Post a Comment