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);
po.setItemList(poIL);
WriteResponse response = port.update(po);
System.out.println(response.getStatus().isIsSuccess());
}
The problems is that the status of the "response" isSuccess=true, but:
1) the statusDetail has an object and that object has:
- a message: "Items on this line have been received. Are you sure you want to modify it?"
- code is WARNING
2) If I check the PO in Netsuite, the state is: Pending Bill
What can I do ? how can I tell NS to don't take care about warning ? or response this question ? is ok think about the way to change the status is billed the items (like the SO and the fulfillment items?)
Many thanks in advance and let me know what can I do to fix this problem ...
Oscar