# Function to get the URI of an entity

**URL:** <https://community.fibery.io/t/function-to-get-the-uri-of-an-entity/4824>\
**Category:** Get Help\
**Created:** [July 21, 2023, 6:08am UTC](https://community.fibery.io/t/function-to-get-the-uri-of-an-entity/4824 "2023-07-21T06:08:43Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Oleg](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/oleg/32/1887_2.png) [@Oleg](https://community.fibery.io/u/Oleg)\
**Post date:** [July 21, 2023, 7:07am UTC](https://community.fibery.io/t/function-to-get-the-uri-of-an-entity/4824/2 "2023-07-21T07:07:07Z")

</div>

Hello, @njyo

Please find below the example of template with link to entity.

```auto
{!Public-id!}
<% const utils = context.getService(`utils`); %>

Url is <%= utils.getEntityUrl(Entity.Type, Entity["Public-id"]) %>

```

Please note `{!Public-id!}` is used for hidden initialisation of field `Public-id`.

Thanks,  
Oleg

---

_[View the full topic](https://community.fibery.io/t/function-to-get-the-uri-of-an-entity/4824)._
