You need to sign in to do that
Don't have an account?
Surya Chandra Rao Gandreddi
forcetk createblob to FeedItem
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
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
dmeyer marley paige
put the file in contentversion then use the id you get back to create a feeditem with the contentversionid as the relatedrecordid and your customobject id as the parentid on the feeditem. you could do that from javascript or add a field to contentversion and a trigger that creates the feeditem