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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to set Line number order in Dynamics ax 2009

(0) ShareShare
ReportReport
Posted on by

Hi All,

I have one Form like this 

line no   name

1             a

2             b 

3             c

4             d--->now I want to change 4 places set 1.I to want this record on top how to do that.

5             e

a present  I am getting 

1   a

2  d ----> I want the modified record on top

3  c

4  b

i put one button in form i write clicked method

I am using this code

void clicked()
{
table1 save;
table1 _table1;
lineNum xlineNum;
int ln;
;
super();

_table1.setTmpData(tmpTable);

select firstonly _table1
order by lineNum desc
where _table1.lineNum == tmpTable.lineNum;

if (_table1.RecId)
{

ln=0;
while select forupdate tmpTable order by LineNum
{

ln++;
tmpTable.LineNum = ln;
tmpTable.update();
}


save= tmpTable.data();

tmpTable.dataSource().research();
tmpTable.dataSource().findRecord(save);
}

}

*This post is locked for comments

I have the same question (0)

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.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Andrew Jones a1x Profile Picture

Andrew Jones a1x 2

#3
Basit Profile Picture

Basit 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans