• Alberto Minardi 1
  • NEWBIE
  • 5 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
Hello,
I'm trying to use the "approval" icon of the slds in a formula field.
https://www.lightningdesignsystem.com/icons/

I managed to reference the image once i load the SLDS as a static resource, but all the icons are white with transparent background...
Anyone know how to reference an org's built-in SLDS icons in a formula (if possible at all). At the recent Lightning Tour I was told by a Salesforce presenter that it would be possible, but I can't figure out how.

Details:

Previous to Winter '17 one would have to upload SLDS components onto a Salesforce org as static resources in order to use them. Like this:

IF ( 
PricebookEntry.Product2.KGRenewal__Subscription__c = true, IMAGE("/resource/1488322284000/LDS_Icons/assets/icons/utility/like_60.png", "Yes", 15, 15), IMAGE("/resource/1488322284000/LDS_Icons/assets/icons/utility/dislike_60.png", "No", 15, 15)
)

In Winter '17 you can access SLDS directly using the $Asset global variable [release note (https://releasenotes.docs.salesforce.com/en-us/spring17/release-notes/rn_vf_asset_variable.htm)], but this necessitates the URLFOR() function, which is not usable (as far as I know) in a formula.