Skip to main content

Notifications

Microsoft Dynamics 365 | Integration, Dataverse...
Answered

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

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.

  • Verified answer
    Arun Vinoth Profile Picture
    Arun Vinoth 11,613 on at
    RE: Questions about FormContext passing the primarycontrol parameter through the Ribbon workbench and get it in html with javascript

    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.

  • Suggested answer
    Henry J. Profile Picture
    Henry J. 5,237 on at
    RE: Questions about FormContext passing the primarycontrol parameter through the Ribbon workbench and get it in html with javascript

    Have you checked that thread?

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

    This could help.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,151 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,963 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans