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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested Answer

Is it Possible to fetch the Sitemap Title name via javascript in D365?

(5) ShareShare
ReportReport
Posted on by 109
I am trying to fetch Sitemap name through javascript.
Is there any way to fetch the title of the Sitemap entity?
 
Categories:
I have the same question (0)
  • Suggested answer
    Jimmy Passeti Profile Picture
    845 Most Valuable Professional on at
    Hello,
     

    Yes, it is possible to fetch the Sitemap Title Name in Dynamics 365 using JavaScript, but not directly through a supported API. The Sitemap Title Name is not exposed through the official Client API, but you can retrieve it using DOM manipulation. However, DOM-based approaches are not supported by Microsoft and may break with future updates.

    Solution (Unsupported Approach)

    You can use JavaScript to query the Sitemap Title from the navigation menu using document.querySelector. Here's an example:

    var sitemapTitle = document.querySelector(".areaTitle").innerText;
    console.log(sitemapTitle);

    Steps to Implement:

    1. Open the Developer Console (F12) in your browser.
    2. Run the script above in the Console.
    3. It should return the name of the active sitemap area.

     

    Alternative Supported Approach

    If you want to retrieve the current sitemap area in a supported way, you can use the Xrm.Utility.getGlobalContext().getCurrentAppProperties() method:

    Xrm.Utility.getGlobalContext().getCurrentAppProperties().then(function(app) {
    console.log("App Name: " + app.appName);
    console.log("App Unique Name: " + app.uniqueName);
    });

    🔹 This gives you the App Name but not the specific sitemap area.
    🔹 For precise sitemap details, you may need to retrieve navigation metadata via a custom web resource or plugin.

    getCurrentAppProperties (Client API reference)

    Recommendation

    • Use the supported API approach whenever possible.
    • If you must use the DOM method, be aware that it can break in future updates.
     
    Regards,
    Jimmy Passeti | Microsoft MVP
    ✅ Please mark as Verified if this answered your question!
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
11manish Profile Picture

11manish 166

#2
ManoVerse Profile Picture

ManoVerse 54 Super User 2026 Season 1

#3
Niki Patel Profile Picture

Niki Patel 40

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans