<@UAY8PEV1B> you could find the URL of that Print ...
# suitescript
s
@Karan you could find the URL of that Print Label button and dynamically plug in the Item Fulfillment ID into it and redirect to it
k
I thought of that, but the URL for the shipping label is static. It doesn't include the Item fulfillment id. The content of this URL reflects the latest Item Fulfillment for which you clicked "Print Label".
s
Yes, looking into it I see what you mean, this is much more tricky-er. When going to the URL: /app/accounting/print/NLSPrintForm.nl
there is a the Item Fulfillment ID in that. Perhaps you could try to re-create the request and it would retrun the shipping label
otherwise a work-around could be to simulate what the user would do by manipulating the DOM, but that’s not always advised as it could change over time.
*I meant there is an item fulfillment ID in the POST request sent to that URL when printing from the IF itself or the Print Shipping Labels page
k
Thanks for the suggestions. When I click on the Print Label from Item Fulfilment itself, it is handled internally and there is no Post request made from the browser. So, not sure about that method
b
share the url of the window/tab that is opened when you click print label
k
This is the URL - /app/accounting/print/NLSPrintForm.nl?printtype=fedexshippinglabel&trantype=itemship&method=print&hotprint=T&title=UPS+Shipping+Labels&startlabel=1&whence=
b
looks like the normal shipping label button
take a look at the print_shipping_label function on the fulfillment page to see how netsuite generates the url