How can I populate displayname on item lines of an...
# suitescript
r
How can I populate displayname on item lines of an invoice? I tried adding a field and using sourcing but it gets wiped out when adding an item group. Like it populates, then it gets wiped out when hitting add for the item group line.
c
Have you tried a text field and don't store the value and make the formula {item.displayname}?
r
I went with a UE. I think adding an item group removes and re-adds the item group line so I handled it beforesubmit
(there's that weird freemarker bug where it gives the last line's displayname over and over when you use item.item.displayname - that's the cause of this)
j
It's a shame that you can't print item fields on transactions without creating a new field on the transaction. Not good database-wise either.. Sometimes that's the way to do it, for instance if you have something that changes on items and you need the current value on the transaction. But it's nuts the way it is now.
👍 1