[SalesForce] rtaimage servlet parameters…what does the refid refer to

I have a blog on a force.com site. The content is read from a custom object that has rich text fields (yes, we rolled our own CMS and run through salesforce approval processes…it's a long story!)

When I put images in these fields, the url for them ends up looking something like this:
http://www.mytruecost.com/servlet/rtaImage?eid=a0U30000008KTl4&feoid=00N30000008ck1W&refid=0EM30000000UE2I

What do those parameters refer to? eid seems to be the custom object that housing the content. feid is the field id. I found those by cutting and pasting the ids into my salesfore url.

But refid gives me an "insufficient priveleges" message. What is it?

Best Answer

eid is a custom object, the "entity ID". Presumably, you could use this to view an instance of your record.

feoid is the "field entity ID". This describes the field that the content is stored in. You can see this value when you're looking at the field in the Setup screen.

refid is an ID of the type ContentReference. We're not able to describe this object, so it's safe to assume that it is also unqueryable from any code we could write.

Execute Anonymous:

System.debug(System.LoggingLevel.ERROR, Id.valueOf('0EM30000000UE2I').getSObjectType());

Output:

ContentReference

Execute Anonymous:

System.debug(System.LoggingLevel.ERROR, Id.valueOf('0EM30000000UE2I').getSObjectType().getDescribe());

Output:

Internal Server Error (...)

In conclusion, it may be necessary, but it is not something that we are subject to viewing. It's also undocumented, so I wouldn't try messing with it.

Related Topic