im trying to create a pdf template for the inbound...
# advancedpdf
s
im trying to create a pdf template for the inbound shipment this is the line that it breaks on if i use item or items
Copy code
<!-- start items --> <#list record.item as item><#if item_index==0>   error message error on line 197 at column 74: StartTag: invalid element name
d
I think battk was right, the inbound shipment record is a bit of an oddity, so probably can't reference the table via
record.item
or
record.items
have you tried the
?xml=T
trick? ☝️ this just shows it as
items
too
I'm guessing the same as battk that you're using
TemplateRenderer.addRecord
. You should be able to get that to work, but if not, you can always try via a search-based pdf template (similar to this: Label Printing for Inbound Shipment)
s
@David B i tried xml trick and it shows the id is items
I can only get the main fields to render not the sublists
i know the sublist id is items because I have a different script that works
Copy code
inboundShipment.selectNewLine({
          sublistId: "items",
        });
        inboundShipment.setCurrentSublistValue({
          sublistId: "items",
          fieldId: "purchaseorder",
          value: POid,
        });
ok i figured out the sublist id is items and this works ${record.items[0].quantityexpected}
it seems i can't use the #list to iterate thru the sublist for inbound shipment does the make any sense ?
Copy code
StartTag: invalid element name