I can't seem to get this to work. I have the follo...
# suitescript
d
I can't seem to get this to work. I have the following JSON string that I'm trying to pass into a submitFields(), but it won't take. Is this just not doable? The script runs with no errors jsonString (debugging shows this to be exact)
Copy code
{
  "custitem_box_quantity": "1",
  "custitem_bag_quantity": "1"
}
Map/Reduce Script has the following:
Copy code
record.submitFields({
    type: record.Type.INVENTORY_ITEM,
    id: data.id,
    values: jsonString
});
b
the values parameter is supposed to be an object
👍 1
to be used as a map where the object's keys are field internal ids and the values the values of the field
is jsonString being used as an object or a string?
d
@battk Thanks! I should have read the help before asking. I removed my JSON.stringify so that it is an object and that did the trick. Not sure why I didn't realize that sooner. Thanks for your help!
🙌 1