• dmeyer marley paige
  • NEWBIE
  • 0 Points
  • Member since 2014
  • Laurel Inc


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Hi,

I'm trying to use forcetk to create a ChatterFile on an object as below:

forcetkClient.createBlob(
    'FeedItem', {
        'ParentId': 'xxxxxxxx', // Custom Object Id
        'ContentFileName': file.name,
        'Type': 'ContentPost',
    }, file.name, 'ContentData', file,
    function(response) {
        console.log(response);
    },
    function(request, status, response) {
        console.log("Error: " + status);
    }
);

But then I get the below error:
[{"message":"Unable to create/update fields: ContentType. Please check the security settings of this field and verify that it is read/write for your profile or permission set.","errorCode":"INVALID_FIELD_FOR_INSERT_UPDATE","fields":["ContentType"]}]

Any suggestions on what I'm missing or doing wrong.

Thanks