```var custpartnum = ""; custpartnum = currentReco...
# suitescript
l
Copy code
var custpartnum = "";
custpartnum = currentRecord.getSublistValue({sublistId: 'item', fieldId: 'custcol_scm_customerpartnumber', line: i});
Which printed on the xml is retrieved by: 
Copy code
<#assign custpart=key.custpartnum> ${custpart}
I wonder where I should link to the item name field (Name on the custom record)
b
probably need to share more code/template
l
Of the print script or the xml template ?
b
both
l
Can’t paste code on a conversation I think
b
it looks like the template is using a custom data source, which means you need to add the data to the object used in TemplateRenderer.addCustomDataSource
l
I did that, I can retrieve the ID, but would like the name of the record instead of the ID.
b
l
instead of currentRecord.getSublistValue, I use getSublistText ?
It works !
Thousand thanks. It was a big struggle 😄