Hello All, I have a question regarding Basic PDF f...
# suitescript
t
Hello All, I have a question regarding Basic PDF form template being rendered in a map/reduce script and sent as an email attachment. For the exact same basic pdf template and exact same packing slip custom form the rendered PDF is different when generated manually from an item fulfillment versus when it’s generated from the map/reduce script. The “manual” generated PDF includes a desired column field but the map/reduced PDF does not. Again, the same basic pdf template is being used in both cases. I have added a custom label on the basic pdf to “prove” that it’s the same basic template being used. Also, all custom Packing Slip forms have the desired field set to print. My question is: Could this be a Netsuite bug or is there something I am missing? I have tried both the following code in the map/reduce:
Copy code
var transactionFilePDF = render.transaction({
  entityId: parseInt(transactionInternalId),
  printMode: render.PrintMode.PDF,
  inCustLocale: true
  });
Copy code
var transactionFilePDF = render.packingSlip({
  entityId: transactionInternalId,
  printMode: render.PrintMode.PDF,
  formId: packingSlipFormId,
  fulfillmentId: transactionInternalId,
  inCustLocale: true
  });
e
Where does the desired column field come from?
t
Hey Eric! The desired field is the out of the box lot number’s expiration date as per screen captures below.
e
Interesting; the only suspicion I had was that maybe it was a field/value added by a script or workflow that wasn't running in the M/R context.
👍 1
Don't know why a native field wouldn't show up
t
My feeling is that this is a Netsuite issue. I have a Netsuite case going with them but so far I am not hearing anything concrete back from them. A colleague suggested I try to see if anyone else had come across this or if there was something I was missing. I’ll let you know what they end up saying. Thanks for your help.
Merci!
e
Any time 🙂
t
@erictgrubaugh so the issue is with 2.1 apparently. According to Netsuite works fine with 2.0 or 2.x.
🧐 1
e
Oh fun
t
🙂
Well, still doesn’t work with 2.0. Waiting for their feedback…
facepalm 1
So turns out it has nothing to do with 2.0 vs 2.1 but is caused by a third party user event script and it looks like the field being printed comes from a custom field and not the out of the box field.
👀 1