Best Of
Re: Intercompany Transfer Order
Hi @User_QQ76D
Create a custom record (e.g., Custom Intercompany Staging) and create the following custom fields.
- From Subsidiary: custrecord_icto_from_sub (Type: List/Record > Subsidiary)
- To Subsidiary: custrecord_icto_to_sub (Type: List/Record > Subsidiary)
- From Location: custrecord_icto_from_loc (Type: List/Record > Location)
- To Location: custrecord_icto_to_loc (Type: List/Record > Location)
- Item: custrecord_icto_item (Type: List/Record > Item)
- Quantity: custrecord_icto_qty (Type: Integer or Decimal)
- Created Order: custrecord_icto_created_order (Type: List/Record > Transaction) (Uncheck 'Mandatory')
- Error Log: custrecord_icto_error_log (Type: Long Text) (Uncheck 'Mandatory')
Save the following code as a .js file (e.g., UE_Create_ICTO_From_Staging.js) and upload it to your File Cabinet.
/**
- @NApiVersion 2 .1
- @NScriptType UserEventScript
- @NModuleScope SameAccount
- Description: Automatically creates an Intercompany Transfer Order when a Custom Staging Record is created via CSV or UI.
*/
define(['N/record', 'N/log'], (record, log) => {
const afterSubmit = (context) => {
// Only run on creation of a new staging record (prevents duplicates if someone edits the record later)
if (context.type !== context.UserEventType.CREATE) {
return;
}
const stagingRec = context.newRecord;
const stagingRecId = stagingRec.id;
const stagingRecType = stagingRec.type;
try {
// 1. Get values from the custom staging record
const fromSubsidiary = stagingRec.getValue({ fieldId: 'custrecord_icto_from_sub' });
const toSubsidiary = stagingRec.getValue({ fieldId: 'custrecord_icto_to_sub' });
const fromLocation = stagingRec.getValue({ fieldId: 'custrecord_icto_from_loc' });
const toLocation = stagingRec.getValue({ fieldId: 'custrecord_icto_to_loc' });
const item = stagingRec.getValue({ fieldId: 'custrecord_icto_item' });
const quantity = stagingRec.getValue({ fieldId: 'custrecord_icto_qty' });
// Validate that required fields are present
if (!fromSubsidiary || !toSubsidiary || !fromLocation || !toLocation || !item || !quantity) {
throw new Error('Missing required fields on the staging record.');
}
// 2. Initialize the Intercompany Transfer Order
// We use dynamic mode so NetSuite automatically sources pricing, accounts, etc.
let ictoRec = record.create({
type: record.Type.INTER_COMPANY_TRANSFER_ORDER,
isDynamic: true
});
// 3. Set Header Level Fields
ictoRec.setValue({ fieldId: 'subsidiary', value: fromSubsidiary });
ictoRec.setValue({ fieldId: 'tosubsidiary', value: toSubsidiary });
ictoRec.setValue({ fieldId: 'location', value: fromLocation });
ictoRec.setValue({ fieldId: 'transferlocation', value: toLocation });
// Default order status to Pending Fulfillment (Optional - configure as needed)
ictoRec.setValue({ fieldId: 'orderstatus', value: 'B' });
// 4. Add the Line Item
ictoRec.selectNewLine({ sublistId: 'item' });
ictoRec.setCurrentSublistValue({ sublistId: 'item', fieldId: 'item', value: item });
ictoRec.setCurrentSublistValue({ sublistId: 'item', fieldId: 'quantity', value: quantity });
ictoRec.commitLine({ sublistId: 'item' });
// 5. Save the Intercompany Transfer Order
let newIctoId = ictoRec.save({
enableSourcing: true,
ignoreMandatoryFields: false
});
log.audit('ICTO Created successfully', `Staging ID: ${stagingRecId} | ICTO ID: ${newIctoId}`);
// 6. Update Staging Record with the success link
record.submitFields({
type: stagingRecType,
id: stagingRecId,
values: {
'custrecord_icto_created_order': newIctoId,
'custrecord_icto_error_log': 'Success'
}
});
} catch (error) {
log.error('Error creating ICTO', `Staging ID: ${stagingRecId} | Error: ${error.message}`);
// If it fails, update the staging record with the error message so the user can fix it
record.submitFields({
type: stagingRecType,
id: stagingRecId,
values: {
'custrecord_icto_error_log': error.message
}
});
}
};
return {
afterSubmit: afterSubmit
};
});
Deploy the Script
- Go to Customization > Scripting > Scripts > New.
- Select your uploaded .js file.
- Click Create Script Record and name it something like “UE Create Intercompany Transfer Order”.
- Go to the Deployments tab.
- In the Applies To dropdown, select your Custom Record (e.g., Custom Intercompany Staging).
- Set Status to Released and Log Level to Debug.
- Save.
Re: Run Allocation Schedule Automatically
I know it can be done via scripting, but I don't have step-by-step guidance. I recommend working with an experienced NetSuite Consultant to build this customization.
NetSuite Admin Tip | Identifying the Smallest First Sales Order Value per Sales Rep Using SuiteQL
Understanding your total sales performance is important but digging deeper into how your sales reps onboard new customers can reveal even more powerful insights.
One valuable metric to track is this: Which sales reps have onboarded customers whose very first sales order had the lowest value?
Why does this matter?
- It helps evaluate onboarding quality and pricing strategy.
- It supports coaching opportunities for reps closing very small initial deals.
- It provides insight into sales minimum thresholds.
- It highlights trends in early customer acquisition behavior.
Using SuiteQL, you can extract this insight directly from your NetSuite data.
SuiteQL Query: Smallest First Sales Order Value Per Rep
SELECT
e.entityid AS salesrep_name, -- Sales rep's display name
MIN(first_orders.first_order_total) AS smallest_first_order_value -- Among all first sales, the lowest value for this rep
FROM (
-- Subquery: For each customer, find their sales rep,
-- their first sales order date, and the value of that earliest order
SELECT
c.id AS customer_id, -- Customer internal ID
c.salesrep, -- Sales rep's internal ID
MIN(t.trandate) AS first_sales_order_date, -- Earliest sales order date for each customer
MIN(t.foreigntotal) AS first_order_total -- Smallest total among all sales orders on the customer's first order date
FROM transaction t
JOIN customer c ON t.entity = c.id
WHERE t.type = 'SalesOrd' -- Only consider sales orders
GROUP BY c.id, c.salesrep
) first_orders
JOIN employee e ON first_orders.salesrep = e.id -- Link each customer’s first sales info to their sales rep for display
GROUP BY e.entityid
ORDER BY smallest_first_order_value ASC -- Show reps with the lowest first order win at the top
- The subquery finds, for each customer, the date of their first sales order and the value (foreigntotal) of that order.
- The outer query groups those first purchase values by sales rep and finds the minimum for each, so you see the lowest initial customer order for each rep.
- ORDER BY lets you quickly spot which reps have had the smallest customer “first win.”
To easily execute a SuiteQL query, see NetSuite Admin Tip | Running SUITEQL Using a Suitelet
The sample code described herein is provided on an "as is" basis, without warranty of any kind, to the fullest extent permitted by law. Oracle + NetSuite Inc. does not warrant or guarantee the individual success developers may have in implementing the sample code on their development platforms or in using their own Web server configurations.
Oracle + NetSuite Inc. does not warrant, guarantee or make any representations regarding the use, results of use, accuracy, timeliness or completeness of any data or information relating to the sample code. Oracle + NetSuite Inc. disclaims all warranties, express or implied, and in particular, disclaims all warranties of merchantability, fitness for a particular purpose, and warranties related to the code, or any service or software related thereto.
Oracle + NetSuite Inc. shall not be liable for any direct, indirect or consequential damages or costs of any type arising out of any action taken by you or others related to the sample code.
We’d love to hear how you integrate SuiteQL into your NetSuite processes! Share your insights and experiences in the NetSuite Admin Corner.
Re: CoPilot and MCP - How to get it working?
I've managed to get this working following the below
Hope it helps.
Re: Native NetSuite Automated Cash Application
From my experience and customer feedback, NetSuite Automated Cash Application works best for high‑volume, straightforward transactions, especially when invoices and payments align cleanly on customer, subsidiary, and currency, but it still requires careful setup and monitoring. A noted limitation is that it does not allow generating payments against invoices in a secondary subsidiary or currency for multi‑subsidiary customers, which is a valid enhancement request for complex intercompany and global AR scenarios.
Hope this helps.
Changes to Invoice Shipping/Billing Address for locked periods
Initially I assumed that altering the address wouldn't affect the GL, allowing us to proceed with changing the address accordingly. However, upon attempting to do so, I discovered that updating the address for a closed period was not possible, even with the "Allow non-GL changes" feature enabled.
Do I need to reopen the account period just to update the invoice address? Is there a way to update the record without reopening the account period?
Thanks in advance.
NSC | Update UPC Code and Auto-Assign the new UPC Code.
Scenario:
Users would like to know if it is possible to edit a manually assigned UPC Code and allow the system to Auto Assign a new UPC Code.
Solution:
Here is a sample testing that users can perform:
A. Create New Item and manually Assign UPC Code
- Navigate to List > Accounting > Items > New > Inventory Item
- Fill-out Mandatory Fields
- Exclude from Auto Assign UPC field = checked (set to true)
- Manually input UPC Code
- Click Save
B. Edit the UPC Code of the Item created and Auto Assign new UP Code.
- Search for the Item created above and click Edit.
- Remove first the UPC Code
- Exclude from Auto Assign UPC = Unchecked (set to false)
- Under UPC Code Assignment, select Assign New UPC Code.
- Click Save.
Additional Note/s:
- For the system to Auto Assign UPC, make sure that there are unused UPC under Lists > Custom > UPC Code.
- If there is none, we may need to create a UPC Code to be used by the system for assignment.
_____________
If you find this information useful, let us know by reacting or commenting on this post!
Re: SCA | Creating a New Customer | "An internal error has occurred"
Hi. @Bry Cabria-Oracle
There was an issue with the access role. I will let you know what I did to get over this issue.
Thank you,
Shubham Singh.
Transaction Name is no longer a link in saved searches after 2026.1?
After our upgrade to 2026.1 we noticed that "Transaction Name" columns in saved searches are no longer a link? Name (customer) and Item both still function as a link to that record, and I checked a main line true and false search but neither allows the "Transaction Name" to be clicked.
Our team uses a lot of transaction line item views that are set to include a linked transaction (purchase order, item fulfillment, etc.). They can still use "View" in the leftmost column to link to the primary transaction of the result, but overnight all of the links to related transactions are broken.
I don't remember seeing anything about it in the release notes- is this an expected change? Or is there some hidden logic now that it is only a link if the search meets certain criteria? (similar to how inline editing is only available under certain conditions)
Re: How can a NAW Licensed Author share a workbook?
Hi @User_F2RD3,
Manuel here from NSAW support team.
This behavior is by design, not an environment issue.
While the NAW Licensed Author role allows users to create and share decks/cards, it does not include catalog administration privileges. Specifically, it does not grant the ability to:
- Create folders under /Shared Folders/
- Move content into Shared Folders (without write access)
- Manage folder-level permissions
The reason you’re seeing:
- No option to create a shared folder
- “OK” button disabled when moving content
is because your role likely does not have write access to Shared Folders, or you don’t have an elevated role such as BI Service Administrator.
To proceed, one of the following is required:
- Grant write access to a specific Shared Folder location
- Or assign a role with broader catalog permissions








