In Focus Resource Center > Insights

How to Import Intercompany Transactions in NetSuite OneWorld

By Citrin Cooperman Digital Services Practice .

Companies utilizing the OneWorld intercompany inventory transfers feature within NetSuite need to understand how to import their data. This feature is meant to transfer inventory between subsidiary locations within a company. There are some settings, such as default status, price, and more, for intercompany transfers. These can be controlled in Settings -> Accounting Preferences. However, NetSuite does not currently support comma-separated value (CSV) import for this transaction type, even though this is the file format that many users are working with. Therefore, a simple, alternative method to import this data is to create a custom record and build intercompany transactions.

Preparing to import data into NetSuite OneWorld

Before beginning to build a custom record, understand that it is meant to stage the data. There are no validations in place, hence, the CSV file should contain proper and meaningful values.

 Custom Record

Once a custom record type has been created, create a USER EVENT Script and deploy it on the custom record type. As shown in the script deployment below, the ‘Applies To’ field is what tells the script to deploy to the custom record that was just created.

Create-User-Event-Script

Sample deployment script for importing data into NetSuite OneWorld

// Build saved search to fetch only those rows from customRecord that are set with ‘Ready to process’. // Note that the CSV import will set the status to ‘Ready to process’. //Loop through each unique Batch_ID and store the values to variable.

//Var from_subsidiary = ‘2’; //internal ID

Var to_subisidiary = ‘3’; //internal ID

Var from_location = ‘10’; //internal ID

Var to_location = ‘20’; //internal ID

Var item_name =’100’; //internal ID

Var item_qty = 20;

Var item_price = 120;

It is important to note that this example is only one item, but it can be adjusted for multiple items by using the loop function.

The script required to create and fetch values from a saved search is not shown above. However, once the values have been obtained, users can create the intercompany transfer record as shown below.

NLRecordObject interCoTransfer = nlapiCreateRecord(‘intercompanytransferorder’, true);

interCoTransfer.setFieldValue(‘orderstatus’, ‘F’); //to pending fulfilment

interCoTransfer.setFieldValue(‘subsidiary’, from_subsidiary); interCoTransfer.setFieldValue(‘tosubsidiary’, to_subisidiary);

interCoTransfer.setFieldText(‘location’, from_location);

interCoTransfer.setFieldText(‘transferlocation’, to_location);

// If there are multiple items within same transfer order, then loop here.

interCoTransfer.selectNewLineItem(‘item’);

interCoTransfer.setCurrentLineItemValue(‘item’, ‘Item.item’, item_name);

interCoTransfer.setCurrentLineItemValue(‘item’, ‘Item.rate’, item_price);

interCoTransfer.setCurrentLineItemValue(‘item’,’quantity’, item_qty);

interCoTransfer.commitLineItem(‘item’);

String key = nlapiSubmitRecord(interCoTransfer);

Store the internal ID of the created record in the custom record. The code sample above just shows the intercompany record creation and does not cover the entire script, such as fetching records from the custom record, updating status onto custom record, error handling, or other actions. Additionally, once the intercompany transfer record is created, it also needs to be approved, fulfilled, or received depending on the settings configuration.

With the approach detailed above, in addition to other approaches, like building a Suitelet application and user event script or building a RESTlet, it is possible to import transfer orders from a CSV file into NetSuite.

NetSuite support provided by Citrin Cooperman

Citrin Cooperman’s Digital Services Practice is skilled in helping business increase efficiency to get the most out of their NetSuite investment. To learn more about our NetSuite support and optimization services and how they can help your business achieve its strategic objectives, reach out to your Citrin Cooperman advisor or sales@citrincooperman.com.

Our specialists are here to help.

Get in touch with a specialist in your industry today. 

By your submission of information in this form, you are consenting to our collection, use, processing and storage of your information in accordance with Citrin Cooperman’s privacy policy. If you have questions regarding our use of your information, please send an e-mail to privacy@citrincooperman.com