Add new column to Sales Order list that displays attached item codes

Hi All,

I want to add a field that I can display in our Sales Order list views that show the attached Item IDs.

In the case that there are more than one Item, I would be happy if the field listed the attached items separated by comma.

Examples;

SO with one item with ID ITEM1

The field would contain a value of “ITEM1”

SO with three items, ITEM1 ITEM2 and ITEM3

The field could display “ITEM1, ITEM2, ITEM3”

Is there a standard or best practice way of achieving this?

I have considered making a custom script that updates a custom field on the Sales Order doctype, with the concatenated ID’s of the attached Items.

Thanks for the help.

Assuming you want to do the above for the same purpose of this post

You can filter your orders by item as the following;