Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 55831

Core CRM Code Failing onLoad:

$
0
0

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!


Viewing all articles
Browse latest Browse all 55831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>