netsuitesuitescript2.0

Netsuite problem rendering picking tickets for specific shipgroups


I am trying to render a picking ticket via the N/render module in suitescript 2.0. We only want to print picking tickets for selected shipgroups. Enable Item Line Shipping has been turned on in the account. I have created a suitelet that displays the sales order lines and provides a checkbox to allow the user to select which ship group they would like to print a picking ticket for. The Netsuite help docs say that the render.pickingTicket function accepts a shipgroup parameter. However, when I pass the shipgroup in to this function, it prints a picking ticket showing all the lines on the sales order and disregards the ship group that I passed in.

If I click on print picking ticket from the sales order screen directly, it prints a picking ticket for each ship group on the order.

The problem, is that we don't want the ship groups that don't have anything left to pick, to print a picking ticket.

How is netsuite generating the picking ticket for each shipgroup, but the render module does not work like that?

I have tried not sending a ship group, and sending a shipgroup from the sales order, both picking tickets looks the same. I have also tried using a negative ship group number to see if that was the issue, and it also showed the same pdf.


Solution

  • Well, I found a workaround in order to make this work. I made a new PDF Template that filters the line items by the ship group that I would like. I had to create a renderer and set fields on the record to pass in the ship group that I would like to print, instead of calling render.pickingTicket.