'NetSuite SOAP API: Populate PurchaseOrderList on VendorBill record retrieval
When using the NetSuite SOAP API I would like to retrieve the purchaseOrderList
for a VendorBill
record. The purchaseOrderList
field is shown as a RecordRefList
on this docs page, however that field doesn't populate on responses when performing a get
to retrieve a vendorBill
based on the internalId
.
I've tried setting the bodyFieldsOnly
header to false, hoping this would cause it to return all related fields, however this doesn't change the response.
Does anyone know how to force a RecordRefList
field type to populate?
Solution 1:[1]
After searching through the docs online it seems that the purchaseOrderList
property on the Vendor Bill is only used when updating the bill to associate it with Purchase Orders, it doesn't look like the property can be returned when retrieving Vendor Bill records. See this docs page under the 'Linking Purchase Orders to a Vendor Bill' section.
In order to retrieve the PO numbers associated with a Vendor Bills items and expenses I am retrieving them from the itemList
and expenseList
properties which are present on the Vendor Bill. If anyone knows of another way please feel free to comment or edit.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Isaac |