Marty Zigman Marty Zigman
Prolecto Labs Accelerator Templates

Get NetSuite Work Order Internal ID from Sales Order

NetSuite Technical

Tags: , ,

This article is relevant if you are developing NetSuite applications against the Sales Order and you need to manipulate the related line based Work Order.

Background

In working with NetSuite light assembly and manufacturing modules, you may need to connect up to a related work order so you can load values and interact.  The challenge is that there is no documented way from a Sales Order line item to find the related Work Order internal ID.

Code to Get Work Order ID from Sales Order Line Item

After one of our senior developers spent a few hours on this, through trial and error and speculation, we believe we found a way to connect with the Work Order ID.  See the following call:

SO.getLineItemValue(“item”, “woid”, 1)

 

The key here is “woid” which connects up the Work Order internal ID.   Given this is not documented, I recommend being cautious with its use.   Let us know if you encounter any updates, hints or changes.

NetSuite Application Developer Opportunities

If you are an independent who appreciates NetSuite’s platform to produce powerful business applications, and you want to work with a team of other professionals that value autonomy, innovation, and ethics, contact us.

Marty Zigman

Holding all three official certifications, Marty is regarded as the top NetSuite expert and leads a team of senior professionals at Prolecto Resources, Inc. He is a former Deloitte & Touche CPA and has held CTO roles. For over 30 years, Marty has produced leadership in ERP, CRM and eCommerce business systems. Contact Marty to set up a conversation.

More Posts - Website - Twitter - Facebook - LinkedIn - YouTube

About Marty Zigman

Marty Zigman

Holding all three official certifications, Marty is regarded as the top NetSuite expert and leads a team of senior professionals at Prolecto Resources, Inc. He is a former Deloitte & Touche CPA and has held CTO roles. For over 30 years, Marty has produced leadership in ERP, CRM and eCommerce business systems. Contact Marty to set up a conversation.

Biography • Website • X (Twitter) • Facebook • LinkedIn • YouTube

3 thoughts on “Get NetSuite Work Order Internal ID from Sales Order

  1. Dustin H says:

    Thank you! very helpful for something I needed today.

  2. Wellyntong Breton says:

    Mr. Zigman…
    I got this error:
    “org.mozilla.javascript.EcmaError: TypeError: Cannot find function getLineItemValue in object dynamic record.”
    I am using Suite scripts version 2.0

    Is there a replacemet for tis API for 2.0?
    …Or what do you sugges?

  3. Marty Zigman says:

    Hello Wellyntong,

    Have you tried this?

    var lineValue = record.getSublistValue({
    sublistId: 'item',
    fieldId: 'woid',
    line: lineNumber - 1 // Zero-based index in 2.0
    });

    Marty

Leave a Reply

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