{"id":104,"date":"2013-01-14T15:52:10","date_gmt":"2013-01-14T10:22:10","guid":{"rendered":"https:\/\/www.dhruvsoft.com\/blog\/?p=104"},"modified":"2025-06-05T14:41:12","modified_gmt":"2025-06-05T09:11:12","slug":"use-formula-field-image-function-to-highlight-process-status-in-salesforce-com","status":"publish","type":"post","link":"https:\/\/www.dhruvsoft.com\/blog\/use-formula-field-image-function-to-highlight-process-status-in-salesforce-com\/","title":{"rendered":"Use Formula Field IMAGE function to highlight process status in Salesforce.com"},"content":{"rendered":"<p>Often customers want to highlight the status of process and alert \u00c2\u00a0users to take corrective action before it is too late. There is nothing better than a visual field that gives you the process health &#8211; Red, Yellow or Green. This can be especially used to highlight the leads that are not acted upon or the opportunities that are stuck.<\/p>\n<div id=\"attachment_105\" style=\"width: 576px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.dhruvsoft.com\/blog\/wp-content\/uploads\/2013\/01\/Use-Formula-Fields-to-Highlight-Process-Status.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-105\" class=\"wp-image-105 \" src=\"https:\/\/www.dhruvsoft.com\/blog\/wp-content\/uploads\/2013\/01\/Use-Formula-Fields-to-Highlight-Process-Status.png\" alt=\"Use Formula Field IMAGE function to Highlight Process Status\" width=\"566\" height=\"175\" srcset=\"https:\/\/www.dhruvsoft.com\/blog\/wp-content\/uploads\/2013\/01\/Use-Formula-Fields-to-Highlight-Process-Status.png 944w, https:\/\/www.dhruvsoft.com\/blog\/wp-content\/uploads\/2013\/01\/Use-Formula-Fields-to-Highlight-Process-Status-300x92.png 300w\" sizes=\"auto, (max-width: 566px) 100vw, 566px\" \/><\/a><p id=\"caption-attachment-105\" class=\"wp-caption-text\">Use Formula Fields to Highlight Process Status<\/p><\/div>\n<p><!--more--><\/p>\n<p>One of the greatest strength of Salesforce.com is ability to create Excel like formula fields.\u00c2\u00a0We can use Force.com\u00c2\u00a0formula field IMAGE function to highlight process status in Salesforce.com. Here is an example of how the Salesforce.com list will look if you create a Formula field with image as the output.<\/p>\n<p>You can write your own business logic based on a status or stage field in combination with the date fields. It is always advisable to write the\u00c2\u00a0logic\u00c2\u00a0you want to build first in a document for clarity.<\/p>\n<p>Here is a sample code for the formula field with IMAGE function<\/p>\n<p><script src=\"https:\/\/gist.github.com\/dhruv-soft\/5720578.js\"><\/script><\/p>\n<p>In the above example we have used two date field on a DeliveryDate__c and FactoryShipmentDate__c along with Stage__c field.\u00c2\u00a0You can try with your own logic of date and status fields.<\/p>\n<h4>Use Cases of Formula Fields with Images<\/h4>\n<p>Here are some of the business use cases that I can think of (I am sure there are many more &#8211; you can suggest):<\/p>\n<ol>\n<li><span style=\"line-height: 13px;\" data-mce-mark=\"1\">Show the status of \u00c2\u00a0lead vis-a-vis created date and status. Highlight the Leads as red that are taking more time then bechmark.<\/span><\/li>\n<li>Show the Opportunity status based on opportunity stage against current date and close date. Highlight the opportunity in Red that are taking more time in a stage than then the benchmark.<\/li>\n<li>Show the order delivery status against delivery date, shipping date and stage (like example above). Orders is a custom object.<\/li>\n<li>Highlight the cases in Red that are violating the service levels.<\/li>\n<li>Highlight the Accounts or Contacts that do not have important information captured.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Often customers want to highlight the status of process and alert \u00c2\u00a0users to take corrective action before it is too late. There is nothing better than a visual field that gives you the process health &#8211; Red, Yellow or Green. This can be especially used to highlight the leads that are not acted upon or [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[66],"tags":[89,90],"class_list":["post-104","post","type-post","status-publish","format-standard","hentry","category-declarative-customization","tag-salesforce-formula-fields","tag-salesforce-formula-fields-examples","entry"],"_links":{"self":[{"href":"https:\/\/www.dhruvsoft.com\/blog\/wp-json\/wp\/v2\/posts\/104","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dhruvsoft.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dhruvsoft.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dhruvsoft.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dhruvsoft.com\/blog\/wp-json\/wp\/v2\/comments?post=104"}],"version-history":[{"count":0,"href":"https:\/\/www.dhruvsoft.com\/blog\/wp-json\/wp\/v2\/posts\/104\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dhruvsoft.com\/blog\/wp-json\/wp\/v2\/media?parent=104"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dhruvsoft.com\/blog\/wp-json\/wp\/v2\/categories?post=104"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dhruvsoft.com\/blog\/wp-json\/wp\/v2\/tags?post=104"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}