Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

How to set Line number order in Dynamics ax 2009

Posted on by Microsoft Employee

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

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans