how to add an auto increatement ID on sales order list at the first column ?

Hi experts.

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.

Gary.

Parents
No Data
Reply
  • 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.

Children
Related
Recommended