Discussions
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
Update an existing line on record transform
Hi There
I have the following script:
/**
*@NApiVersion 2.x
*@NScriptType MapReduceScript
*/
define(["N/record", "N/search", "N/runtime"], function (
record,
search,
runtime
) {
function getInputData() {
try {
var scriptObj = runtime.getCurrentScript();
var recordId = scriptObj.getParameter("custscript_recordid");
var salesOrderid = recordId;
log.debug("recordid", salesOrderid);
var salesorderSearchObj = search.create({
type: "salesorder",
filters: [
["type", "anyof", "SalesOrd"],
"AND",
["internalid", "anyof", [salesOrderid]],
"AND",
["shipping", "is", "F"],
"AND",
["taxline", "is", "F"],
"AND",
["mainline", "is", "F"],
"AND",
[
"formulanumeric: {quantitypacked}-{quantitybilled}",
"greaterthan",
"0",
],
],
columns: [
search.createColumn({ name: "internalid", label: "Internal ID" }),
search.createColumn({ name: "source", label: "Source" }),
search.createColumn({ name: "salesrep", label: "Sales Rep" }),
search.createColumn({ name: "trandate", label: "Date" }),