Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Warning

Alas, I can’t get the Trailhead icon or the Astro icon to work!

You could use this github repo site https://github.com/CodeScience/SLDS-icon-font/tree/master/dist/assets/icons/utilitywww.salesforceicons.com/ to find what the names would most likely be, but just test it out. Take your base domain, add /apexpages/slds/latest/ then grab the “/assets/icons/utility/announcement_60.png” from the URL from that repo and see if it displays something.

...

Now, unfortunately the Utility Icons are grey and boring as PNGs and the doctype icons are very limited, so you are back to sourcing these icons from outside of Salesforce if you don’t want to download them yourself, convert them to the coloured PNGs and upload them to the Assets File Library and mark them as shareable and then get the very long URL. Nope, all to hard (yes, you can do Document Library and / or Static Resource, but I’m just trying to demonstrate the “Lightning Way”). Shun has done that for you and is hosting them on a Heroku repo,

So you could do something like

Code Block
<apex:pagecontentType="image/svg+xml">
<svg xmlns="http://www.w3.org/2000/svg">
  <image href="http://lds-png-icons.herokuapp.com/icons/custom/custom97.png" x="0" y="0" height="50px" width="50px"/>
</svg>
</apex:page>

or even just

Code Block
IMAGE("http://lds-png-icons.herokuapp.com/icons/custom/custom97.png", "Thermometer", 50, 50)

But remember with any external site there is no guarantee that it will be there in future. So there is not a fabulous answer to having all those SLDS icons in your Salesforce formulas easily, but you have a few options if you just want the utility or doctype icons. Otherwise there is a heap of icon resources over on the Actions Examples page.

...