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 CRM (Archived)

can't get handle to crm form element through js?

(0) ShareShare
ReportReport
Posted on by

Hello - I was trying to get a handle to a CRM form element through js and I was running into issues. I used the browser element inspector to click on a left nav menu item (Contact > Quotes).

The browser element inspector showed an ID of "navQuotes". However, when I went to the js console and executed alert(document.getElementById('navQuotes')) the browser returned a alert with a message of null.

This seems pretty unusual. Do you have any idea about the explanation for why this does not seem to be working as expected?

 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    jlattimer Profile Picture
    24,564 on at

    You should be using:

    Xrm.Page.ui.navigation.items.get("navQuotes")
    
    

    Xrm.Page Reference

    Addressing items on the CRM for by directly manipulating the DOM isn't supported - have a look into using the Xrm.Page object in the link.

  • Mohammad Atif Profile Picture
    on at

    Andrew : Please update the thread if you have more questions, if not please mark this thread as answered for jlattimer  

    Thanks,

    Mohammad

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 CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans