Manufacturing Cost Template

If the Manufacturing Routing and Work Center feature has been enabled, you can use SOAP web services to interact with manufacturing cost template records. You can check to see whether the feature is enabled by going to Setup > Company > Setup Tasks > Enable Features, and reviewing the Items & Inventory tab.

The benefit of this feature is that it lets you specify a sequence of tasks required for the completion of a Work In Process (WIP) work order. You take advantage of this feature using a few records, including cost template. The purpose of the cost template record is to group together the various expenses associated with a specific activity. These expenses might include the cost of paying employees, operating machinery, and so on.

For details on the process of manually creating a cost template, see Creating Manufacturing Cost Templates. For more information about the Manufacturing Routing and Work Center feature, see Manufacturing Routing.

The manufacturing cost template record is defined in the listScm XSD.

Supported Operations

The following operations can be used with the manufacturing cost template record.

add | addList | delete | deleteList | get |getDeleted |getList | 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 manufacturing cost template reference page.

Note:

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

Usage Notes

Refer to the following sections for more details on interacting with manufacturing cost template records.

Prerequisites for Adding a Record

When you create a cost template record, at least one row is required in the costDetail sublist. Each sublist entry must reference certain records that already exist in NetSuite, including at least one cost category and one item, as described below.

Cost Category

You reference an existing cost category record using the costCategory element. Note that the category referenced must use one of the cost types designed for use with manufacturing routing. These types are described in Defining Cost Categories for Manufacturing Routing and Work Center. This topic also describes important restrictions regarding cost types that can be referenced only one time on a cost template record. Failure to follow these guidelines results in an error.

Item

You reference an existing item record using the item element. The function of the item record is to represent a specific expense that belongs to a manufacturing routing cost category. Only certain types of items can be set up this way. For more details, see Defining a Manufacturing Charge Item.

Sample Code

The following code illustrates how to add a manufacturing cost template record.

Java

          public void testAddRecord() throws Exception 
 
{
 
// This operation requires a valid session
this.login(true);
 
ManufacturingCostTemplate mct = new ManufacturingCostTemplate();
 
//subsidiary
mct.setSubsidiary(new RecordRef(null, "1", null, RecordType.subsidiary));
 
//name
mct.setName("ManufacturingCostTemplate");
 
//memo
mct.setMemo("ManufacturingCostTemplateMemo");
 
//cost detail
ManufacturingCostTemplateCostDetailList mctcdl = new ManufacturingCostTemplateCostDetailList();
 
ManufacturingCostTemplateCostDetail mctcd1 = new ManufacturingCostTemplateCostDetail();
 
//line #1
mctcd1.setCostCategory(new RecordRef(null, "1", null, RecordType.costCategory));
mctcd1.setItem(new RecordRef(null, "4639", null, RecordType.otherChargePurchaseItem));
 
mctcdl.setManufacturingCostTemplateCostDetail(new ManufacturingCostTemplateCostDetail[] {mctcd1});
 
mct.setCostDetailList(mctcdl);
 
c.addRecord(mct);
} 

        

SOAP Request

          <?xml version="1.0" encoding="UTF-8"?>
   <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 
      <soapenv:Header>  
         <ns1:passport soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0" xmlns:ns1="urn:messages_2017_1.platform.webservices.netsuite.com">   
            <ns2:email xmlns:ns2="urn:core_2017_1.platform.webservices.netsuite.com">nlbuild@netsuite.com</ns2:email>   
            <ns3:password xmlns:ns3="urn:core_2017_1.platform.webservices.netsuite.com">password</ns3:password>   
            <ns4:account xmlns:ns4="urn:core_2017_1.platform.webservices.netsuite.com">3604360</ns4:account>   
            <ns5:role internalId="37" xmlns:ns5="urn:core_2017_1.platform.webservices.netsuite.com"/>  
         </ns1:passport> 
      </soapenv:Header> 
   <soapenv:Body>  
      <add xmlns="urn:messages_2017_1.platform.webservices.netsuite.com">   
         <record xsi:type="ns6:ManufacturingCostTemplate" xmlns:ns6="urn:supplychain_2017_1.lists.webservices.netsuite.com">    
            <ns6:subsidiary internalId="1" type="subsidiary" xsi:type="ns7:RecordRef" xmlns:ns7="urn:core_2017_1.platform.webservices.netsuite.com"/>    
            <ns6:name xsi:type="xsd:string">ManufacturingCostTemplate</ns6:name>    
            <ns6:memo xsi:type="xsd:string">ManufacturingCostTemplateMemo</ns6:memo>    
            <ns6:costDetailList replaceAll="false" xsi:type="ns6:ManufacturingCostTemplateCostDetailList">     
               <ns6:manufacturingCostTemplateCostDetail xsi:type="ns6:ManufacturingCostTemplateCostDetail">      
                  <ns6:costCategory internalId="1" type="costCategory" xsi:type="ns8:RecordRef" xmlns:ns8="urn:core_2017_1.platform.webservices.netsuite.com"/>      
                  <ns6:item internalId="4639" type="otherChargePurchaseItem" xsi:type="ns9:RecordRef" xmlns:ns9="urn:core_2017_1.platform.webservices.netsuite.com"/>     
               </ns6:manufacturingCostTemplateCostDetail>    
            </ns6:costDetailList>   
         </record>  
      </add> 
   </soapenv:Body>
</soapenv:Envelope> 

        

SOAP Response

          <?xml version="1.0" encoding="utf-8"?>
   <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <soapenv:Header>
         <platformMsgs:documentInfo xmlns:platformMsgs="urn:messages_2017_1.platform.webservices.netsuite.com">
         <platformMsgs:nsId>WEBSERVICES_3604360_031120131489538171800510632_a6b8a93ca56e</platformMsgs:nsId>
         </platformMsgs:documentInfo>
      </soapenv:Header>
      <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="4402" type="manufacturingCostTemplate" xsi:type="platformCore:RecordRef" xmlns:platformCore="urn:core_2017_1.platform.webservices.netsuite.com"/>
            </writeResponse>
         </addResponse>
      </soapenv:Body>
   </soapenv:Envelope> 

        

Related Topics

General Notices