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 :
Service | Customer Service, Contact Center, Fie...
Suggested Answer

Is window.parent.addEventListener supported?

(0) ShareShare
ReportReport
Posted on by 5

Hi, 

I am working on a PCF control that populates data on the dynamics 365 form. I have found one from PCF gallery that creates a custom event window.dispatchEvent(customEvent) and JavaScript web resource listens to the event using window.parent.addEventListener. This seems to be working for me. However, Could anyone please let me know if window.parent.addEventListener is supported way on implementation in dynamics?
I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    Hi vbaaz,

    Based on the following threads, Accessing DOM is not supported by DYnamics 365 which is why it has stopped working, but it can work through PCF.

    (+) window.addEventListener is not working in Dynamics 365 - Dynamics 365 Customer Service Forum Community Forum

    Solved: Cannot read property 'addEventListener' of null at... - Power Platform Community (microsoft.com)

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 > Service | Customer Service, Contact Center, Field Service, Guides

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 75 Super User 2025 Season 2

#2
Siv Sagar Profile Picture

Siv Sagar 52 Super User 2025 Season 2

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 42 Most Valuable Professional

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans