NetSuite Vendor Bill Created From Purchase Order References

Background

NetSuite’s general transaction architecture is to generate child records from copies of parent records. For example, on the Sales Order, when it is time to bill, the resulting invoice is effectively a copy with a cross-reference via the Created From field.  This pattern is used extensively in the NetSuite environment. 

Yet, there may be use cases where this relationship is not always true.  Curiously, if you review the SuiteScript Records Browser for the “vendorbill” record, you will see no reference to the “created from” field.   I suspect this is because NetSuite allows you to consolidated multiple purchase orders on to a single vendor bill.

Nonetheless, if you run a saved search on a vendor bill, and reference “Created From” you will get back a value.  However, it is important to understand that this value may not be reliable.

Reviewing NetSuite Vendor Bill Purchase Order Sublist

To help illustrate this, we need to consider the use cases where multiple purchase orders are used to generate a single vendor bill. To achieve the resulting vendor bill, we use NetSuite’ bulk “Bill Purchase Order” tool. See related image.

When inspecting the resulting vendor bill, NetSuite conveniently supplies a purchase order sublist. But what do you do if you need to get more purchase order information than what is supplied natively by NetSuite?  Here is where your assumptions may mislead you — most of us would use NetSuite’s built-in capacity to generate a new sublist and connect it to a saved search with information from the “created from” field supplying us the purchase order. Indeed, you can connect it up — however, you will only be able to reference information from the most recent purchase order, not the true entire list of “created from” purchase orders.

If you inspect the underlying vendor bill record object, NetSuite supplies a “purchaseorder” sublist that contains the information you need. Yet, from what I can tell, the list is not available in Saved Search. When reviewing SuiteAnswers, it appears that the Created From purchase order is the most recent one.

Approach to Produce NetSuite Vendor Bill Sublist of Related Purchase Orders

Given we have a sublist of information supplied on the Vendor Bill record object, we have an opportunity to create a reliable sublist.  Here is what I would do:

  1. Get Purchase Order IDs: On the record’s beforeLoad event, get reference to the purchaseorder machine sublist.
  2. Craft Search: Dynamically generate a saved search using the list of purchase order IDs as criteria.
  3. Present Sublist: Draw a new sublist in a tab using the saved search result as the source.

While this is inconvenient compared to the point-and-click sublist generation capacities built into the platform, we do indeed have a pathway. Respectfully, if the business does not use the bulk Bill Purchase Orders feature, then the standard “created from” technique works.

Leave a comment

Your email address will not be published. Required fields are marked *