Previous record in the ax 2009

Hi All,

Any one have an idea about , How to find the previous record when am in the currect record(eg: i have a Order no 100, 101, 102, …, currently my cursor is present in the Order no 102, and i need the Order no 101 details).

Thanks in adv,

Valeru.

I tried this in a Axapta Job. May be it is useful to you.

SalesTable salesTable;

SalesId lastSalesId; ;

while select salesTable

{

print lastSalesId;

print salesTable.SalesId;

lastSalesId = salesTable.SalesId;

}

datasourcename_Ds.prev()

the above command used to traverse records in datasource

if you want to traverse in table…you can use recid ( they r unique and ordered)

Hi Asaraf,

can u give me an example pls