How to add an icon to a D365 segment template
Published: 2022-11-28 07:10:02

_As a D365 Marketing user, have you ever wondered why segment templates you created do not have icons like the system provided segment templates?_


![List view of segment templates](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dkfa1mjtbb3q6wuew0pv.png)

<figcaption>Find the imposter!</figcaption>

---

Although we can use filters, naming conventions and descriptions to locate the template we need, a visual hint is always good to have. Several clients and community members have asked about how to add custom icons to user created segment templates so I am going to demonstrate the simple steps to enable custom icons in this article.

---

Conceptual aside - the icon image we see on a segment template record is stored in an "Image" column of "Segment Template" table, named "Icon". 


![Image column of segment template](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/al25li7rzs5s8ib4gbb7.png)

<figcaption>Image column of a table</figcaption>

---

A table can have multiple image columns but only one can be dedicated as a "Primary Image Column". In a normal table (without further customization), the picture stored in the primary image column will be the icon shown on a record. The tables without a primary image column will not have this icon on the table form.

![Contact form](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uygao1h1ihhcfgyyuh2w.png)

<figcaption>Primary image column shown on the main form</figcaption>

---

On the segment template table, the image stored in primary image column will be shown directly on the segment templates list view, tile view and main form.


![Segment template list view](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/truzmxybhgdp89px1ic0.png)

<figcaption>List view</figcaption>
---

![Segment template tile view](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/01cs7v3l41w4e1xdqrs4.png)
<figcaption>Tile view</figcaption>
---

![Segment template main form](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4tlnt7s3j74taaamfpax.png)
<figcaption>Main form</figcaption>
---

Now to the actual process. I mentioned steps, but it is actually **one step** - simply left click on the icon on the main form and a dialog will pop up for you to view or edit the image. It is so simple that this step did not even cross my mind. Previously, I was under the assumption that the primary image column would have to be added to the main form for users to modify. However, [Megan](https://meganvwalker.com/) told me about the simple approach which made me rethink about solutioning for any requirements or challenges - there always might be an out-of-box approach to look for before thinking about a customized solution.


![Change the icon](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cn9ht9wcts0tpgjoxkh3.png)

<figcaption>A simple click and you can change the icon</figcaption>

---

Voila! Now you have the ability to add visuals to help other users understand what your segment template does. Just remember that any "Image" column data can only be populated after a record is saved, not when a record is being created.

---


_Some additional words for the adventurous type of people: being able to add more visuals is fantastic, but the image column should be used sparingly since it will **eat up the allocated file storage** within an environment if a lot of tables are configured to have image columns. Only use the image column when it is necessary and make sure you set a reasonable max image size when creating an image column. Otherwise, always use less expensive solutions such as **[SharePoint integration](https://learn.microsoft.com/en-us/power-platform/admin/set-up-dynamics-365-online-to-use-sharepoint-online)**._

![Image column configuration](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1bzz7utb4fbmqzmdilxd.png)
<figcaption>The maximum image size can only be configured when the column is being created, not afterwards<figcaption>

I hope that this article is somewhat useful to you and feel free to reach out if you have any questions. Happy marketing!