Hey there - does anybody have an Advanced PDF vers...
# advancedpdf
a
Hey there - does anybody have an Advanced PDF version of a Packing Slip (printed from Item Fulfillment) where, when using Item Groups, it will print the item group header only, and not the Item Group components on the IF (even though the header is not on the IF record at all)? I'm looking at this requirement and assuming that it cannot work, because that data is NOT on the IF at all. I think this is something that Basic templates handled easily/gracefully, but not with Advanced at all - unless I've totally missed it.
m
I don't have any code to share but I recall doing something similar with kits (wanting to print just the kit without the components) and having to look for something that would identify if the line was a component. From memory, I ended up using the lack of a tax code to determine this. Item groups may be different though. If it helps at all, you do have access to the salesorder record in the IF template
s
I was doing something like this for invoices, maybe it might help. Basically if isgroup is true then display or not display the subitems till EndGroup is there <#if item.itemtype == “Group”> <#assign isgroup = true> <#elseif item.itemtype == “EndGroup”> <#assign isgroup = false> </#if>
a
thanks guys - i've done things like that before too, @Selcuk Dogru but the problem is that the Group and EndGroup lines don't appear on an Item Fulfillment, as they are not fulfillable. @michoel I have done something like what you describe before too, looking for a hidden field value that indicates whether a line is part of a group. I didn't see one in the data model but will look again.
hey so after doing some more digging, it looks like the out of the box advanced PDF templates handles this somehwat gracefully - it looks at the salesorder lines as Michoel mentions, but it also respects the Item Group preference for whether to display components on transactions or not. The issue comes in when trying to incorporate data from both the SO lines as well as the IF lines - to do this you need an
<#if>
within the double-loop, to pull in the extra data only for when the SO line matches the IF line. but for item group header rows, it will never match because Item Group headers are never on IF records
but as long as you take care to get around this, it works fine
s
thank you for the info. I am in between if I enjoy or hate trying to find out how NetSuite handles the links between records
t
better to teach yourself to love it, the alternative isn't pretty
a
Agreed, but what's frustrating about it to me is that in many areas the connections are sensible and consistent. Then in other areas it feels like it's completely backwards or hacked together.
🎯 1