Discussions
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
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);