web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Questions about FormContext passing the primarycontrol parameter through the Ribbon workbench and get it in html with javascript

(0) ShareShare
ReportReport
Posted on by 5

Hello everyone, I have a small problem, I have a custom button, where through a code I open a webresource screen that is HTML and Javascript, I pass the "primarycontrol" parameter but at the time of consulting the parameter in Javascript To get some data with dynamics, he tells me that the parameter is not defined, someone could help me, I would greatly appreciate it.

I have the same question (0)
  • Suggested answer
    Henry J. Profile Picture
    5,237 on at

    Have you checked that thread?

    stackoverflow.com/.../how-to-get-formcontext-in-ribbon-command-of-dynamics-365-9-0

    This could help.

  • Verified answer
    Arun Vinoth Profile Picture
    11,615 Moderator on at

    When you open the HTML web resource popup using the Ribbon button click, you will be able to get the Xrm.Page by using the window.opener.Xrm.Page

    If its embedded, then window.parent.Xrm.Page should work.

    This is still supported & only way to get the parent page context.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Pallavi Phade Profile Picture

Pallavi Phade 102 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 71

#3
Abhilash Warrier Profile Picture

Abhilash Warrier 55 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans