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)

Core CRM Code Failing onLoad:

(0) ShareShare
ReportReport
Posted on by

Earlier I posted about a problem I was having where all of a sudden I was not able to access Xrm.Page.getAttribute() and other key methods. (Xrm.Page.getControl(field).getAttribute() works, though).

Now I am getting a similar problem in code I don't control.

On my Opportunity form, the jScript is failing in GridControl.js:

if($v_0.getAttribute("Expandable")==="1"&&this.get_element().parentNode.className!=="ms-crm-Category-List")

if($v_0.getAttribute("Expandable")==="1"&&this.get_element().parentNode.className!=="ms-crm-Category-List")

The error is:

Unable to get property 'className' of undefined or null reference

Using F12, set a breakpoint and traced this.get_element().parentNode.

this.get_element() is an object of type DispHTMLElementCollection. Its outerHTML element shows:

"\r\n<DIV id=MySites class=ms-crm-ListControl-Ex type=\"crmGrid\"></DIV>"

So far, so good. 

Here's the problem. When I look at parentNode, that's an object of type DispHTMLDocument but the object doesn't have a className element.

This is not custom code. This is the core construction of the form. Yet CRM is bombing looking for an element that isn't there.

CRM 2011 On-Prem UR14.

I don't need an answer but if anyone has any ideas on this one I'd love to hear them. Thank you!

*This post is locked for comments

I have the same question (0)
  • Drew Poggemann Profile Picture
    4 on at

    Hi Bob, is the === valid?  Before I look any further into this wanted to quickly check.

    Thanks,

  • Bob Hatcher Profile Picture
    on at

    Yes, it is actually best practice to use === over ==.

    Mind you, this is Microsoft's code.

    This is pertaining to a certain element on my page, which I removed; now I'm getting the same error on a different element.

    Other symptoms are that when the page loads, console fills up with this:

    2015_2D00_11_2D00_03-20_5F00_13_5F00_43_2D00_F12.png

    And, it seems to be loading all my web resources twice.

    2015_2D00_11_2D00_03-20_5F00_13_5F00_43_2D00_F12.png

    While you're at it, can you also figure out what's wrong with Wisconsin's hockey team? :)

  • Suggested answer
    Aiden Kaskela Profile Picture
    19,696 on at

    Hi Bob,

    I have to think that if this started suddenly and in different files, it's either a problem with your browser, anti-virus, or something happened on the server. Since it's client side scripts, I would lean more toward something on your computer.

    I hate suggesting this because it sounds so lazy, but have you tried clearing your cache, running in Private browsing, tried a different browser or a different User?

    Thanks,

     Aiden

  • Bob Hatcher Profile Picture
    on at

    Hi Aiden, thank you for the suggestion - I actually had not cleared cache. But I did and I still get the same problem. I am mostly concerned about IE11 since that's what the majority of the user base is using.

  • Community Member Profile Picture
    on at

    Bob - Do you have IE updates KB3093983 installed by any chance?  If you do, you might want to see if you get those errors in Chrome.  If you don't, you might want to try uninstalling the update.    We had to remove this update from all our users' computers because IE11 constantly crashed on their machines.  

  • Verified answer
    Bob Hatcher Profile Picture
    on at

    Turns out this problem went away when I added my domain to Trusted Sites. I'm skeptical it wasn't a cache or other local issue but that's what seemed to do it.

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