Discussions
Read on for the latest updates including:
• Agenda Builder launch
• SuiteWorld On Air registration
• New NetSuite Prompt Studio Contest
• And more!
Check out this thread to learn more!
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);