Skip to main content

Notifications

Announcements

No record found.

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.

  • 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!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans