Discussions
Join the NetSuite community to innovate, connect, and discover what’s next.
SuiteWorld brings thousands of innovators, builders, and leaders together to learn, connect, and shape what’s next. This October, explore how to build a stronger foundation for growth through inspiring keynotes, major product reveals, hands-on sessions, and unforgettable moments—all in one place for our biggest event of the year. Register now
Purchase Order - change status
Hi all,
I'm trying to change the status of a PO. Orginally the PO is in status: Pending Bill and I want to change it to Billed, the status field is read onlly then I'm trying to change the PurchaseOrderItem. The PO is very simple, just has 1 line, I'm attaching the code:
private void markPOBilled(NetSuiteServiceManager port, String poID) throws Exception {
PurchaseOrder po = new PurchaseOrder();
po.setInternalId(poID);
PurchaseOrderItemList poIL = new PurchaseOrderItemList();
PurchaseOrderItem[] poItems = new PurchaseOrderItem[2];
poItems[0] = new PurchaseOrderItem();
RecordRef item0 = new RecordRef();
item0.setInternalId("xxxx");
poItems[0].setItem(item0);
poItems[0].setQuantityBilled(new Double(1));
poItems[0].setLine(new Long(1));
poItems[0].setIsBillable(Boolean.TRUE);