web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

setting html title based on the entity form in the dynamics window

(0) ShareShare
ReportReport
Posted on by 195

Has anyone tried to have the browser title (via the html title element) track the entity being "viewed" in a form?

Some simple javascript (almost a one liner) could do this but are there any downsides for changing the browser tab title?

*This post is locked for comments

I have the same question (0)
  • aappddeevv Profile Picture
    195 on at

    Just to be clear, I want to "shorten" the title that is placed there so its easier to read in a smaller tab. When you get more than a few tabs, having the "form name" + name + "Microsoft Dynamics 365" is a bit long.

  • Suggested answer
    Emre GULCAN Profile Picture
    2,379 on at

    Hi,

    You can do it with javascript by using "document.title", however because of D365 page structure you need to reach top level (window.parent)

    Depend on your requirements you can call it on form onload event and add some variables, simple code below.

    I think this is not unsupported customization.

    function changeTitle() {
        var myEntityName = Xrm.Page.data.entity.getEntityName();
        var myFormName = Xrm.Page.ui.formSelector.getCurrentItem().getLabel();
    
        window.parent.document.title = "my custom title";
        //also you can use myEntityName and myFormName variables
    }


Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans