I have a map/reduce script that I can pass document numbers to and I want it to set list/record fields to associate the corresponding transaction for that document number. How do I set the field without having to run a search to find an internal id when I already have a doc id?
I got the code below to work in a schedule workflow as a workflow action script, but It doesn't work in a map/reduce.
var soString = 'Sales Order #' + docId;
newRec.setText({
fieldId: 'custrecord_salord',
text: soString
});