Work Order Issue

If the Manufacturing Work In Process (WIP) feature has been enabled, you can use SOAP web services to interact with work order issue records. You can verify whether WIP is enabled by going to Setup > Company > Enable Features, and reviewing the Items & Inventory tab.

With WIP, instead of creating a single assembly build record to denote that a work order has been addressed, you track progress of the work using three records: work order issue, work order completion, and work order close. This approach lets you manage the assembly process in a more granular way, and to keep the General Ledger up to date as materials move through the different phases of assembly. For more on the benefits of WIP, refer to Manufacturing Work In Process (WIP).

The work order issue record is used to indicate that particular quantities of raw materials, or component items, have been gathered for the production of the assembly item (or items).

In the UI, you can view the form used for creating the work order issue record by choosing Transactions > Manufacturing > Issue Components, selecting a Subsidiary (for OneWorld accounts), then clicking the Issue link that corresponds with one of listed work orders. An alternate method is to view the work order and click the Issue Components button. For help filling out the form manually, refer to Entering Work Order Issues.

The work order issue record is defined in the tranInvt (inventory) XSD.

Supported Operations

The following operations can be used with work order issue records:

add | addList | attach / detach | delete | deleteList | get | getDeleted | getList | getSavedSearch | initialize / initializeList | search | update | updateList | upsert | upsertList

Note:

You can also use the asynchronous equivalents of SOAP web services list operations. For information about asynchronous operations, see SOAP Web Services Asynchronous Operations. For more information about request processing, see Synchronous Versus Asynchronous Request Processing.

Field Definitions

The SOAP Schema Browser includes definitions for all body fields, sublist fields, search filters, and search joins available to this record. For details, see the SOAP Schema Browser’s work order issue reference page.

Note:

For information about using the SOAP Schema Browser, see SOAP Schema Browser.

Usage Notes

Refer to the following sections for more details on interacting with work order issue records.

Prerequisites for Creating a Record

Before you can create a work order issue record, a work order record must already exist, and the work order must be configured to use WIP (the WIP box on the work order record must be selected). This is true regardless of whether you are creating the work order issue record using initialize and add, or add by itself. If you try to create a work order issue record referencing a work order that has not been configured to use WIP, the system generates an error reading in part, “One of the following problems exists: You have an invalid work order < work order ID >, the work order does not use WIP, or the work order is already closed.”

You can create and modify work orders by choosing Transactions > Manufacturing > Enter Work Orders. You can also interact with work orders using SOAP web services, as described in Work Order.

Note also that the assembly item referenced in the work order must be properly set up for WIP. as described in the Setting Up Items as WIP Assemblies.

Using Initialize Versus Add

You can initialize a work order issue record from a Work Order record. This is the preferred approach, though you can also create the record using the add operation by itself.

The initialize operation emulates the UI workflow by prepopulating fields on transaction line items with values from a related record. For more information about this operation, see initialize / initializeList.

If you are using the add operation by itself, note that you must use the createdFrom field to identify the appropriate work order. If you fail to set a value for this field, the system generates an error reading, “Transaction can only be created from a work order.”

Working with the ComponentList Sublist

The work order issue record includes the componentList sublist, which identifies the component items required by the work order.

When working with the work order issue record, most of the data in the componentList sublist is static — except for quantity. That is, you can update the individual quantities of each of the items listed, but you cannot add or remove items from the list.

In regard to quantity adjustments, note that, for each item, there is a maximum quantity. This maximum is determined by both the assembly item record and the work order record. For example, suppose you have an assembly item record for a widget that calls for 10 nails. If you create a work order calling for six builds of the widget, a total of 60 nails will be needed. Therefore, when you create the work order issue record, you can update the quantity of nails up to a maximum of 60.

Related to this, note that the maximum is cumulative. This rule is significant if you create multiple work order issue records for the same work order, or if you have also created work order completions with backflush (another record that lets you specify that certain quantities of component items have been used). To follow on with the previous example, suppose you create one work order issue record that records the use of 10 nails, and one work order completion with backflush that records the use of 20 nails. An additional work order issue record could denote the use of only 30 nails.

Using ReplaceAll

When you set replaceAll to true when working with the componentList sublist, you must specify a value for each record in the sublist. If you fail to reference each record, the system generates an error.

Sample Code

The following code illustrates how to add a work order issue record using a few different techniques.

Using Both Initialize and Add

This example shows how to create a work order issue record using both the initialize and add operations, which is the preferred approach. Note that this technique results in two sets of SOAP requests and responses.

Although the sample below does not change the quantities of items on the componentList sublist, it would be possible to do so by using set commands between the initialize and add statements.

Java
          InitializeRef initRef = new InitializeRef();
initRef.setType(InitializeRefType.workOrder);
initRef.setInternalId("167");
 
WorkOrderIssue woRecord = (WorkOrderIssue) c.initialize(initRef,InitializeType.workOrderIssue,null);
 
c.addRecord(woRecord); 

        
SOAP Request (Initialize)
          <soapenv:Body>  
    <initialize xmlns="urn:messages_2017_1.platform.webservices.netsuite.com">   
      <initializeRecord>    
         <ns7:type xmlns:ns7="urn:core_2017_1.platform.webservices.netsuite.com">workOrderIssue</ns7:type>    
         <ns8:reference internalId="167" type="workOrder" xmlns:ns8="urn:core_2017_1.platform.webservices.netsuite.com"/>   
      </initializeRecord>  
   </initialize> 
</soapenv:Body> 

        
SOAP Response (Initialize)
          <soapenv:Body>
    <initializeResponse xmlns="urn:messages_2017_1.platform.webservices.netsuite.com">
       <readResponse>
         <platformCore:status isSuccess="true" xmlns:platformCore="urn:core_2017_1.platform.webservices.netsuite.com"/>
         <record xsi:type="tranInvt:WorkOrderIssue" xmlns:tranInvt="urn:inventory_2017_1.transactions.webservices.netsuite.com">
            <tranInvt:createdDate>2013-03-07T07:10:00.000-08:00</tranInvt:createdDate>
            <tranInvt:lastModifiedDate>2013-03-07T07:43:00.000-08:00</tranInvt:lastModifiedDate>
            <tranInvt:tranId>3</tranInvt:tranId>
              <tranInvt:item internalId="247" xmlns:platformCore="urn:core_2017_1.platform.webservices.netsuite.com">
               <platformCore:name>JS Assembly Item Y</platformCore:name>
            </tranInvt:item>
            <tranInvt:createdFrom internalId="167" xmlns:platformCore="urn:core_2017_1.platform.webservices.netsuite.com">
               <platformCore:name>Work Order #1</platformCore:name>
            </tranInvt:createdFrom>
            <tranInvt:tranDate>2013-03-07T00:00:00.000-08:00</tranInvt:tranDate>
            <tranInvt:postingPeriod internalId="141" xmlns:platformCore="urn:core_2017_1.platform.webservices.netsuite.com">
               <platformCore:name>Mar 2013</platformCore:name>
            </tranInvt:postingPeriod>
            <tranInvt:subsidiary internalId="3" xmlns:platformCore="urn:core_2017_1.platform.webservices.netsuite.com">
               <platformCore:name>SUB  UK</platformCore:name>
            </tranInvt:subsidiary>
            <tranInvt:location internalId="2" xmlns:platformCore="urn:core_2017_1.platform.webservices.netsuite.com">
               <platformCore:name>Location UK</platformCore:name>
            </tranInvt:location>
            <tranInvt:componentList>
               <tranInvt:workOrderIssueComponent>
                  <tranInvt:item internalId="245" xmlns:platformCore="urn:core_2017_1.platform.webservices.netsuite.com"/>
                  <tranInvt:quantity>23.0</tranInvt:quantity>
                   <tranInvt:lineNumber>5</tranInvt:lineNumber>
               </tranInvt:workOrderIssueComponent>
                  <tranInvt:workOrderIssueComponent>
                  <tranInvt:item internalId="246" xmlns:platformCore="urn:core_2017_1.platform.webservices.netsuite.com"/>
                  <tranInvt:quantity>27.0</tranInvt:quantity>
                  <tranInvt:lineNumber>6</tranInvt:lineNumber>
               </tranInvt:workOrderIssueComponent>
            </tranInvt:componentList>
            <tranInvt:customFieldList xmlns:platformCore="urn:core_2017_1.platform.webservices.netsuite.com">
               <platformCore:customField internalId="65" scriptId="custbody_633637_bsubmit" xsi:type="platformCore:BooleanCustomFieldRef">
                  <platformCore:value>false</platformCore:value>
               </platformCore:customField>
               <platformCore:customField internalId="34" scriptId="custbody_633637_bload" xsi:type="platformCore:BooleanCustomFieldRef">
                  <platformCore:value>false</platformCore:value>
               </platformCore:customField>
               <platformCore:customField internalId="215" scriptId="custbody_633637_asubmit" xsi:type="platformCore:BooleanCustomFieldRef">
                  <platformCore:value>false</platformCore:value>
               </platformCore:customField>
            </tranInvt:customFieldList>
         </record>
      </readResponse>
   </initializeResponse>
</soapenv:Body> 

        
SOAP Request (Add)
          <soapenv:Body>  
   <add xmlns="urn:messages_2017_1.platform.webservices.netsuite.com">   
      <record xsi:type="ns7:WorkOrderIssue" xmlns:ns7="urn:inventory_2017_1.transactions.webservices.netsuite.com">    
         <ns7:createdDate xsi:type="xsd:dateTime">2013-03-07T15:10:00.000Z</ns7:createdDate>    
         <ns7:lastModifiedDate xsi:type="xsd:dateTime">2013-03-07T15:43:00.000Z</ns7:lastModifiedDate>    
         <ns7:tranId xsi:type="xsd:string">3</ns7:tranId>    
         <ns7:item internalId="247" xsi:type="ns8:RecordRef" xmlns:ns8="urn:core_2017_1.platform.webservices.netsuite.com">     
            <ns8:name xsi:type="xsd:string">JS Assembly Item Y</ns8:name>    
         </ns7:item>    
         <ns7:createdFrom internalId="167" xsi:type="ns9:RecordRef" xmlns:ns9="urn:core_2017_1.platform.webservices.netsuite.com">     
            <ns9:name xsi:type="xsd:string">Work Order #1</ns9:name>    
         </ns7:createdFrom>    
         <ns7:tranDate xsi:type="xsd:dateTime">2013-03-07T08:00:00.000Z</ns7:tranDate>    
         <ns7:postingPeriod internalId="141" xsi:type="ns10:RecordRef" xmlns:ns10="urn:core_2017_1.platform.webservices.netsuite.com">     
            <ns10:name xsi:type="xsd:string">Mar 2013</ns10:name>    
         </ns7:postingPeriod>    
         <ns7:subsidiary internalId="3" xsi:type="ns11:RecordRef" xmlns:ns11="urn:core_2017_1.platform.webservices.netsuite.com">     
            <ns11:name xsi:type="xsd:string">SUB  UK</ns11:name>    
         </ns7:subsidiary>    
         <ns7:location internalId="2" xsi:type="ns12:RecordRef" xmlns:ns12="urn:core_2017_1.platform.webservices.netsuite.com">     
            <ns12:name xsi:type="xsd:string">Location UK</ns12:name>    
         </ns7:location>    
         <ns7:componentList replaceAll="false" xsi:type="ns7:WorkOrderIssueComponentList">     
         <ns7:workOrderIssueComponent xsi:type="ns7:WorkOrderIssueComponent">      
            <ns7:item internalId="245" xsi:type="ns13:RecordRef" xmlns:ns13="urn:core_2017_1.platform.webservices.netsuite.com"/>      
            <ns7:quantity xsi:type="xsd:double">23.0</ns7:quantity>      
            <ns7:lineNumber xsi:type="xsd:long">5</ns7:lineNumber>     
         </ns7:workOrderIssueComponent>     
         <ns7:workOrderIssueComponent xsi:type="ns7:WorkOrderIssueComponent">      
            <ns7:item internalId="246" xsi:type="ns14:RecordRef" xmlns:ns14="urn:core_2017_1.platform.webservices.netsuite.com"/>      
            <ns7:quantity xsi:type="xsd:double">27.0</ns7:quantity>      
            <ns7:lineNumber xsi:type="xsd:long">6</ns7:lineNumber>     
         </ns7:workOrderIssueComponent>    
         </ns7:componentList>    
         <ns7:customFieldList xsi:type="ns15:CustomFieldList" xmlns:ns15="urn:core_2017_1.platform.webservices.netsuite.com">     
            <ns15:customField internalId="65" scriptId="custbody_633637_bsubmit" xsi:type="ns15:BooleanCustomFieldRef">      
               <ns15:value xsi:type="xsd:boolean">false</ns15:value>     
            </ns15:customField>     
            <ns15:customField internalId="215" scriptId="custbody_633637_bload" xsi:type="ns15:BooleanCustomFieldRef">      
               <ns15:value xsi:type="xsd:boolean">false</ns15:value>     
            </ns15:customField>     
            <ns15:customField internalId="23" scriptId="custbody_633637_asubmit" xsi:type="ns15:BooleanCustomFieldRef">
               <ns15:value xsi:type="xsd:boolean">false</ns15:value>     
            </ns15:customField>    
         </ns7:customFieldList>   
      </record>  
   </add> 
</soapenv:Body> 

        
SOAP Response (Add)
          <soapenv:Body>
   <addResponse xmlns="urn:messages_2017_1.platform.webservices.netsuite.com">
      <writeResponse>
      <platformCore:status isSuccess="true" xmlns:platformCore="urn:core_2017_1.platform.webservices.netsuite.com"/>
      <baseRef internalId="174" type="workOrderIssue" xsi:type="platformCore:RecordRef" xmlns:platformCore="urn:core_2017_1.platform.webservices.netsuite.com"/>
      </writeResponse>
   </addResponse>
</soapenv:Body> 

        

Using Add

This example uses the add operation to create the work order issue record. This example also sets values for the quantities of items in the componentList sublist.

Java
          RecordRef createdFromRef = new RecordRef();
createdFromRef.setInternalId("167");
 
RecordRef postingPeriodRef = new RecordRef();
postingPeriodRef.setInternalId("141");
 
RecordRef departmentRef = new RecordRef();
departmentRef.setInternalId("2");
 
RecordRef classRef = new RecordRef();
classRef.setInternalId("2");
 
RecordRef locationRef = new RecordRef();
locationRef.setInternalId("2");
 
RecordRef item1Ref = new RecordRef();
item1Ref.setInternalId("245");
 
RecordRef item2Ref = new RecordRef();
item2Ref.setInternalId("246");
 
WorkOrderIssue newWOI = new WorkOrderIssue();
newWOI.setExternalId("WOI-JS-002-TEST");
newWOI.setCreatedFrom(createdFromRef);
newWOI.setPostingPeriod(postingPeriodRef);
newWOI.setDepartment(departmentRef);
newWOI.set_class(classRef);
newWOI.setLocation(locationRef);
newWOI.setMemo("Memo text");
 
WorkOrderIssueComponent[] componentListArray = { new WorkOrderIssueComponent(), new WorkOrderIssueComponent() };
componentListArray[0].setItem(item1Ref);
componentListArray[0].setQuantity(2.0);
componentListArray[1].setItem(item2Ref);
componentListArray[1].setQuantity(3.0);
 
WorkOrderIssueComponentList componentList = new WorkOrderIssueComponentList();
componentList.setWorkOrderIssueComponent(componentListArray);
componentList.setReplaceAll(false);
newWOI.setComponentList(componentList);
 
c.addRecord(newWOI); 

        
SOAP Request
          <soapenv:Body>  
   <add xmlns="urn:messages_2017_1.platform.webservices.netsuite.com">   
      <record externalId="WOI-JS-002-TEST" xsi:type="ns6:WorkOrderIssue" xmlns:ns6="urn:inventory_2017_1.transactions.webservices.netsuite.com">    
         <ns6:createdFrom internalId="167" xsi:type="ns7:RecordRef" xmlns:ns7="urn:core_2017_1.platform.webservices.netsuite.com"/>    
         <ns6:postingPeriod internalId="141" xsi:type="ns8:RecordRef" xmlns:ns8="urn:core_2017_1.platform.webservices.netsuite.com"/>    
         <ns6:memo xsi:type="xsd:string">Memo text</ns6:memo>    
         <ns6:department internalId="2" xsi:type="ns9:RecordRef" xmlns:ns9="urn:core_2017_1.platform.webservices.netsuite.com"/>    
         <ns6:class internalId="2" xsi:type="ns10:RecordRef" xmlns:ns10="urn:core_2017_1.platform.webservices.netsuite.com"/>    
         <ns6:location internalId="2" xsi:type="ns11:RecordRef" xmlns:ns11="urn:core_2017_1.platform.webservices.netsuite.com"/>    
         <ns6:componentList replaceAll="false" xsi:type="ns6:WorkOrderIssueComponentList">     
            <ns6:workOrderIssueComponent xsi:type="ns6:WorkOrderIssueComponent">      
               <ns6:item internalId="245" xsi:type="ns12:RecordRef" xmlns:ns12="urn:core_2017_1.platform.webservices.netsuite.com"/>      
               <ns6:quantity xsi:type="xsd:double">2.0</ns6:quantity>     
            </ns6:workOrderIssueComponent>     
            <ns6:workOrderIssueComponent xsi:type="ns6:WorkOrderIssueComponent">      
               <ns6:item internalId="246" xsi:type="ns13:RecordRef" xmlns:ns13="urn:core_2017_1.platform.webservices.netsuite.com"/>      
               <ns6:quantity xsi:type="xsd:double">3.0</ns6:quantity>     
            </ns6:workOrderIssueComponent>    
         </ns6:componentList>   
      </record>  
   </add> 
</soapenv:Body> 

        
SOAP Response
          <soapenv:Body>
   <addResponse xmlns="urn:messages_2017_1.platform.webservices.netsuite.com">
      <writeResponse>
         <platformCore:status isSuccess="true" xmlns:platformCore="urn:core_2017_1.platform.webservices.netsuite.com"/>
          <baseRef internalId="171" externalId="WOI-JS-002-TEST" type="workOrderIssue" xsi:type="platformCore:RecordRef" xmlns:platformCore="urn:core_2017_1.platform.webservices.netsuite.com"/>
      </writeResponse>
   </addResponse>
</soapenv:Body> 

        

Related Topics

Transactions
Usage Notes for Transaction Record Types
Transaction Search
Multiple Shipping Routes in SOAP Web Services
How to Use the SOAP Web Services Records Help
SOAP Web Services Supported Records
SOAP Schema Browser
SuiteTalk SOAP Web Services Platform Overview

General Notices