Skip to main content
I am trying to insert image as follows 

 

contents = fs.readFileSync('/home/xxxxx/Pictures/download (3).jpg')

 

base64data = new Buffer(contents).toString('base64')

 

 conn.sobject("CaseFeed").create({

 

            ContentType : 'image/jpg'

 

            ContentFileName: 'TestImage2.jpg'

 

            ContentData: base64data

 

            Type : 'ContentPost' },(err, ret) ->

 

  if err or !ret.success

 

    return console.error(err, ret)

 

  console.log 'Created record id : ' + ret.id

 

  return

 

But its ending with bellow error :

 

err {

 

  debug: 'entity type cannot be inserted: Case Feed',

 

  stack: 'CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY: entity type cannot be inserted: Case Feed}
3 answers
  1. Feb 9, 2016, 10:49 AM
    Verify that the user runing this script has permission to insert records in CaseFeed object.

     

    Thanks

     

    Ashwani
0/9000