1

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.

/servlet/rtaImage?eid={...}&feoid={...}&refid=0EM30000001GFrs

Any idea?

1

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

ID refid='0EM28000000I7Eq';

SYSTEM.DEBUG(refid.getSObjectType().getDescribe().getName());

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'

Cheers.

  • 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;. – Jan Tosovsky Dec 18 '15 at 15:39

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.