ugh, i forgot about this issue with SS2.0 map/redu...
# suitescript
d
ugh, i forgot about this issue with SS2.0 map/reduce: 1) if the
getInput()
returns a
inputContext
object,
Copy code
return {type: "search", id: "123"};
then the
mapcontext.value
object is a SS1.0 type:
Copy code
custrecord_my_bool_field: "T",
  custrecord_my_rec_ref: {
    "value": "1",
    "text": "cus-123456"
  }
2) If the
getInput()
runs the search and returns a search result:
Copy code
return { mySearch.run().getRange({start:0, end:10}) };
then the
mapcontext.value
object is a SS2.0 type:
Copy code
custrecord_my_bool_field: true,
  custrecord_my_rec_ref: [{
    "value": "1",
    "text": "cus-123456"
  }]
But,
custrecord_my_rec_ref
is now an array, I still don't understand that one.