suitescript to print picking ticket from sales ord...
# ask-stanley-ai
k
suitescript to print picking ticket from sales order
c
AI generated answer (using internal Slack threads):
To print a picking ticket from a sales order using SuiteScript, you can use the
N/redirect
module to redirect the user to the print picking ticket URL. The URL structure for printing a picking ticket is as follows:
<https://system.na2.netsuite.com/app/accounting/print/hotprint.nl?regular=T&sethotprinter=T&template=133&id=4539167&label=Picking+Ticket&printtype=pickingticket&trantype=salesord>
You can replace the
id
parameter with the internal ID of the sales order you want to print the picking ticket for. Here is a sample SuiteScript code:
Copy code
javascript
var redirect = require('N/redirect');

function printPickingTicket(context) {
    var salesOrderId = context.newRecord.id;
    redirect.toSuitelet({
        scriptId: 'customscript_print_picking_ticket',
        deploymentId: 'customdeploy1',
        parameters: {
            'id': salesOrderId
        }
    });
}
Please note that the
scriptId
and
deploymentId
in the
toSuitelet
method should be replaced with the actual script ID and deployment ID of your Suitelet. Also, to make the 'Print Picking Ticket' option available to other roles, you need to grant the 'Fulfill Orders' permission to those roles. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.867431641
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.855468631
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.85345459
Please provide your feedback on this answer.