0

I have a problem with chatter files, I have a webcam theese webcam take a snap and I need upload this snap to chatter entry in a Chatter of custom object.

Image of webcam in chatter

After of take a picture with the webcam I upload the base64 code of image to a file in Salesforce, but i don't know how to upload the file without attachment this file. I need use the file in Chatter file.

Some of the errors I get are:

FIELD_INTEGRITY_EXCEPTION, ContentFileName is a required field for feed posts of type ContentPost: [ContentFileName]

FIELD_INTEGRITY_EXCEPTION, Related Record ID: id value of incorrect type: 069Q0000000Y3QHIA0: [RelatedRecordId]

3
  • Some errors FIELD_INTEGRITY_EXCEPTION, ContentFileName is a required field for feed posts of type ContentPost: [ContentFileName] – netovs Oct 25 '17 at 16:25
  • FIELD_INTEGRITY_EXCEPTION, Related Record ID: id value of incorrect type: 069Q0000000Y3QHIA0: [RelatedRecordId] – netovs Oct 25 '17 at 16:25
  • The first error tells you to give this file a name. The second error tells you that the related record id should be of a different type. You have tried to attach it to a contentdocument, but you need to attach it to a contentversion. If you need further help please edit your post, and add the relevant code. – Kasper Oct 26 '17 at 0:08
0

How are you posting the file. To which object on salesforce you are posting ? Base64 data should be posted to the object ContentDocument or VersionData

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.