I'm getting a "Cannot call method "split" of null ...
# advancedpdf
j
I'm getting a "Cannot call method "split" of null (INVOCATION_WRAPPER#26)" error when printing picking tickets with an Advanced PDF template. I don't get this error on all orders, and it's not customer or sales order form specific. Here is the template... any ideas? I'll put the top of the form (few tables and formatting) in the thread, but I don't see how the culprit is in there. edit: Template was added to thread by David via text snippet. Thank you @David B, I learned something new today.
👍 1
d
hey, here's how to create a text snippet for posting long templates/code. Just keeps the main channel tidier/easier to scroll for other users
👍 1
If anyone else wanted to look at it, here's the whole thing in a snippet:
I can't see any actual "`?split`" built-ins being used, so my guess is that it may be the `?substring`s you're calling on fields "`custrecord_ltl_receiving_hours_end`/`start`" Try logging out the values of start/end directly and see if there's anything amiss (like missing values)
also, if you wouldn't mind, please edit your original post to remove the template (unfortunately you can't add a text snippet retrospectively)