I want to use a check mark image in the formula field. I got confused about where to store the image: in static resources or in documents. Please explain to me the use cases of both.
2 Answers
Typically, static resources is used for files that will need to be transferred between orgs. Often, images are put here that are used within code, Javascript, CSS, or documents that code might reference.
Documents is meant as a reference for the typical end Users to use when necessary. This does not transfer between orgs.
Note that if you want to make say an image used in a HTML template available to the unauthenticated recipient of the email then you must use a Document as described in How do I reference a public image stored in salesforce.com in my HTML?.
Short answer, if you are using it for a check mark image that will be used in a field, this needs to go between orgs and so I would use a static resource if possible.
If you are willing to use the default Salesforce checkmark image, then having this in a formula field having return type as 'text' should work.
IMAGE("/img/checkbox_checked.gif", "check")
-
1Referencing the images provided by Salesforce is generally bad practice. If the location or the name of this image is changed, the implementation is broken until it is noticed and corrected. That said, SFDC does do it in some of their own documentation on image formulas. Jun 10, 2014 at 19:26