Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Object doesn't support property or method 'addEventListener'

Posted on by Microsoft Employee

I get the below error message while I try to add a contact from another customized entity (similar to Add Members).
the error msg is as follows

<CrmScriptErrorReport>
  <ReportVersion>1.0</ReportVersion>
  <ScriptErrorDetails>
   <Message>Object doesn't support property or method 'addEventListener'</Message>
   <Line>1</Line>
   <URL>/_static/_common/scripts/jquery-2.1.1.min.js?ver=1444911418</URL>
   <PageURL>/XXXControls/dlg_query_build_mod.aspx?InvokeType=lqAdd&ListId=%7b4E96B9DA-6C9C-E511-80C6-005056021BA6%7d&ListMemberType=2</PageURL>
   <Function>anonymous(b){returnH||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)}</Function>
   <FunctionRaw>function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)}</FunctionRaw>
   <CallStack>
    <Function>anonymous(b){returnH||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)}</Function>
   </CallStack>
  </ScriptErrorDetails>
  <ClientInformation>
   <BrowserUserAgent>Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; .NET4.0C; .NET4.0E)</BrowserUserAgent>
   <BrowserLanguage>en-US</BrowserLanguage>
   <SystemLanguage>en-US</SystemLanguage>
   <UserLanguage>en-US</UserLanguage>
   <ScreenResolution>1366x768</ScreenResolution>
   <ClientName>Web</ClientName>
   <ClienState>Online</ClienState>
   <ClientTime>2016-03-16T15:30:47</ClientTime>
  </ClientInformation>
  <ServerInformation>
    <OrgLanguage>1033</OrgLanguage>
    <OrgCulture>1033</OrgCulture>
    <UserLanguage>1033</UserLanguage>
    <UserCulture>1033</UserCulture>
    <OrgID>{20BCEB7F-3EBF-42E4-B659-EDD91D3D5330}</OrgID>
    <UserID>{0F6E89D0-D2F3-E411-80C3-005056021BA6}</UserID>
    <CRMVersion>8.0.0.1094</CRMVersion>
  </ServerInformation>
</CrmScriptErrorReport>
I am using CRM 2016, these errors are seen after migrating from CRM 2015, the same code works fine with CRM 2015, and I use IE 11 versions.

Few solutions online suggest that i use <meta http-equiv =”X-UA-Compatible” content =”IE = edge” />, but this doesnt solve any problem.
Rather, the changes i had to do these were in CRMWEB folder on the server machine.


I did come across a solution in https://carstengroth.wordpress.com/tag/script/ which asks to modify <EnableContextualActions>false</EnableContextualActions>. 
MSDN suggests this is only for Internal use in the FORMXML.

Any suggestions and solutions are welcome and thanks in Advance.

 

*This post is locked for comments

  • Suggested answer
    ShahXu Profile Picture
    ShahXu 1,515 on at
    RE: Object doesn't support property or method 'addEventListener'

    kindly share your code.

    in CRM 2016 you can't addevents i guess so instead of changing anything in CRM go for workaround

  • Suggested answer
    nghieppham Profile Picture
    nghieppham 4,755 on at
    RE: Object doesn't support property or method 'addEventListener'

    Hello,

    Please check your old code. CRM 2016 has been limited for using DOM in javascript. It is not recommended, please try other way, you can check new event for control in CRM 2016.

    Please also share you code and your situation for more investigating.

    Regards,

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,944 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,400 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans