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.
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
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.
Method 2
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”)
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0