{id: searchResult[i].getValue({ name: "internalid", label: "Internal ID", }), coordinator: { phone: nullValidation( searchResult[i].getValue({ name: "email", join: "CUSTBODY_COORDINATOR", label: "Email", }) ), }, amount: nullValidation( searchResult[i].getValue({ name: "amount", label: "Amount" }) ), orderType: nullValidation( searchResult[i].getValue({ name: "ordertype", label: "Order Type" }) ), opportunity: { // {opportunity} id: nullValidation( searchResult[i].getValue({ name: "internalid", join: "opportunity", label: "Internal ID", }) ), // Internal Id of opportunity, number: nullValidation( searchResult[i].getValue({ name: "transactionnumber", join: "opportunity", label: "Transaction Number", }) ), }, attachments: [ // Field Id {custbody_file_attachments} contains list of URLs. Need split into array. { fileName: nullValidation( searchResult[i].getValue({ name: "name", join: "file", label: "Name", }) ), url: "" ? null : "https://3959483.app.netsuite.com" + "" + searchResult[i] .getValue({ name: "url", join: "file", label: "URL" }) .split("
"), }, ], notes: [ { notes: nullValidation( searchResult[i].getValue({ name: "custbody_user_notes_list", label: "User Notes", }) ).split("

"), }, ], items: [],}