What is your use-case for serializing tthe orderline? Is there a use outside of display on the order or invoice?
If it is just a display item for an invoice ir order recap, just insert a merge field for RecordNumber.
I agree with Joshua, what are the order specific counter numbers going to be used for.
Are they going to be used for setting sort order?
One way of doing it:
- Go to related order lines from order*.
- replace field content script step.
- replace with serial numbers, start from 1.
*First check that there are at least one order line.
But what is the purpose?
I'm not sure I just got given the requirement of how that field should work. I did it In the end by making a self join with 2x TOs of the same table and then counting the number of related lines within one record, if none then the result is 1. If there's more than one count the related and + 1.
Thanks for the answers.