I don't know if you are got such request?
our customer wants to add a new column at the 1st column which is auto increment in sales order list ? And don't need to save a new field in table, just need to show it on the page.
Any suggestion will be warmly appreciated.
The easy way is to declare an integer variable in the list page. Set it to 0 OnInitRec, and then add +1 in the OnAfterGetRecord trigger.But depending on the key and your filters, then you might end up with an incorrect number.
The better (and more correct/difficult way) would be to use OnNextRecord, but then you need a lot more code to manage the page.
Hi Erik, Thanks for you reply, yup , the 1st way, i have tried, after changed the default sort, the number changed to be incorrect, I want to use onNextRecord, But no experice on this function, could you guide me a lot? thanks in advance.