1

I am trying to save FeedItem with attachments. In that case I set type of FeedItem to ContentPost. During saving FeedItem I am getting 2 errors of FIELD_INTEGRITY_EXCEPTION type:

ContentFileName is a required field for feed posts of type ContentPost: Content File Name
ContentData is a required field for feed posts of type ContentPost: Content Data

And here magic starts, because I am using API version 52 and I know from documentation that fields ContentFileName, ContentData are obsolet for my version and I even can't see them in my WSDL file.

Have anyone occured similar problem and know any solution? Maybe I have to configure something on Salesforce side?

I would be grateful for any advice!

1 Answer 1

1

From what I can tell, we are not supposed to insert FeedItems as "ContentPost" anymore. Instead:

  • Insert them without specifying a Type. You probably get a "TextPost".

  • Insert the FeedAttachment, specifying the FeedEntityId - and hey presto - your FeedItem morphed into a "ContentPost".

1
  • 1
    That was very simple solution. Thank you for fast response! :) Feb 8 at 15:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .