Does anybody know how to access Rich Text area image repository programmatically? What is the object behind? I'd like to upload some files there and then reference them in the Rich Text content (everything without user intervention).

When inserting images manually, all of them have the same eid and feoid, the only difference is refid. I couldn't find this Id in Document or ContentDocument objects.


Any idea?

1 Answer 1


If you have id of a record, you can easily find the related object, using describe methods.

ID refid='0EM28000000I7Eq';


After describing all 3 ids, below are the objects

  1. eid = Object which has the RTF field
  2. feoid = Object Name 'CustomFieldDefinition'
  3. refid = 'ContentReference'


  • 1
    It took me some time to learn Apex. I can reproduce your results now. That ContentReference seems to be the key, but I cannot access this SObject via REST API. When querying this object via Apex, there are suspicious properties: isAccessible=false;isCreateable=false;isQueryable=false;isSearchable=false;isUpdateable=false;. Commented Dec 18, 2015 at 15:39

You must log in to answer this question.

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