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)

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,562 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

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