What data do I need to create an inbound shipment ...
# ask-stanley-ai
r
What data do I need to create an inbound shipment via script?
c
AI generated answer (using internal Slack threads):
To create an inbound shipment via script in NetSuite, you would need the following data: 1. Purchase Order (PO) details: The inbound shipment is linked to one or more POs. You need to know the PO numbers and the items on those POs that are being shipped. 2. Shipment details: This includes the shipment number, shipment status, expected delivery date, actual delivery date, and other related information. 3. Vendor details: Information about the vendor sending the shipment. 4. Item details: Information about the items being shipped, including item numbers, quantities, and units of measure. Here is a sample code snippet that was shared in the thread. It sets the shipment status to 'in transit' if the actual last release date is set and the current shipment status is 'toBeShipped':
Copy code
javascript
//check to see if actual last release date is set and convert to in transit
if(REC.getValue('custrecordactlastrelease') && REC.getValue('shipmentstatus')=='toBeShipped') {
    REC.setValue('shipmentstatus','inTransit');
}
Please note that this is a simplified example and you may need to adjust it based on your specific requirements. Also, keep in mind that the 'shipmentstatus' field is documented as read-only, but it seems to be writable in some contexts. ****** 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.850275576
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.84061259
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.840243697
Please provide your feedback on this answer.