0

I am trying to automate "Mark Shipped" functionality of purchase order using scheduled script. I have tried to set the status of purchase order using the following code

nlapiSubmitField('purchaseorder',purchaseorderid,'status','F',false);

I also tried with

nlapiSubmitField('purchaseorder',purchaseorderid,'orderstatus','F',false);

But it didn't work.

prasun
  • 7,073
  • 9
  • 41
  • 59
  • you mean Sales Order or Purchase Order? – prasun Mar 10 '16 at 05:10
  • It's an intercompany purchase order with "Mark Shipped" button at the top. – Netsuite Learner Mar 10 '16 at 13:26
  • On most transactions, you are not able to manipulate the statuses fully. There are a few ways you can programmatically change them, but most statuses require a subsequent transaction to be created and linked to the original transaction. For example, For a Sales Order to move to the Billed status, there must be an Invoice linked to it. You cannot simply set the Sales Order status to billed. – erictgrubaugh Mar 10 '16 at 15:17
  • Was able to solve this issue by transforming the sales order to item fullfillment. Thanks a lot guys! – Netsuite Learner Mar 10 '16 at 16:09

2 Answers2

0

There is no Status on Purchase order as Mark Shipped. Mark Shipped will be available in Item Fulfillment. Can you post what you are exactly trying to do with the code to help you.

Following are the Purchase Order Status in NetSuite

Purchase Order:Closed
Purchase Order:Fully Billed
Purchase Order:Partially Received
Purchase Order:Pending Bill
Purchase Order:Pending Billing/Partially Received
Purchase Order:Pending Receipt
Purchase Order:Pending Supervisor Approval
Purchase Order:Rejected by Supervisor
  • It an inter company purchase order with 'Mark Shipped" button at the top .. when clicked it creates a item fulfillment and changes the purchase order status from "pending receipt" to "pending bill" . I tried to transform the purchase order to 'item fulfillment' but that is not a valid transformation. – Netsuite Learner Mar 10 '16 at 13:49
0

Was able to solve this issue by transforming the sales order to item fulfillment. Thanks a lot guys! –