Discussions
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
Unexpected Token Error on Map Reduce script
Hi There
I am getting an error on the following
/**
*@NApiVersion 2.x
*@NScriptType MapReduceScript
*/
define([
"N/search",
"N/record",
"N/render",
"N/file",
"N/xml",
"N/email",
"N/runtime",
], function (search, record, render, file, xml, email, runtime) {
function getInputData(context) {
var scriptObj = runtime.getCurrentScript()
var recordId = scriptObj.getParameter("custscript_recordid")
var id = recordId
log.debug("recordid", recordId)
var vendorpaymentSearchObj = search.create({
type: "vendorpayment",
filters: [
["type", "anyof", "VendPymt"],
"AND",
["custbody_9997_pfa_record", "anyof", id],
],
columns: [
//0
search.createColumn({
name: "transactionnumber",
summary: "GROUP",
label: "Transaction Number",
}),
//1
search.createColumn({
name: "formulatext",
summary: "GROUP",
formula: "{entity}",
label: "Vendor",
}),
//2
search.createColumn({
name: "formulatext",
summary: "GROUP",
formula: