Related to my attempts to fix #2 above, does anyon...
# suitescript
a
Related to my attempts to fix #2 above, does anyone know the correct syntax for updating a contact record image? I've tried this and many variations of it. No matter what I set the "image" attribute to I get a
INVALID_KEY_OR_REF
Invalid image reference key
error
Copy code
record.submitFields({
    type: record.Type.CONTACT,
    id: contactId,
    values: { image: fileId }
});
a
idk this is working fine?
check your fileId value?
oh wait i think you need quote 'image'
i didn't even notice that i did that differently, my fingers just did that without consulting my brain
e
Object keys don't need quotes
a
@Anthony OConnor what tool are you using there?
a
umm that's just the dev tools in chrome browser?
a
Should have been obvious 🙂 I haven't used Chrome to test suitescript code before, but that ended up being really handy here. Thanks for the tip!
The issue ended up being that the file I was trying to set was in the wrong folder. Needed to be images, e.g.
-4
👍 1