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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Formcontext.ui.tabs..n...
Power Apps
Answered

Formcontext.ui.tabs..not working in MDA

(0) ShareShare
ReportReport
Posted on by 16

I am getting erros stating that formContext is not defined and cannot read"tabs" in the following

 var maintab =formContext.ui.tabs.get("tabname");

 

Used the below method in retrieving record and update record to refresh the tabs.

 

Retrieve method:-window.parent.xrm.page.retrieverecords():

 

 

maintab.refresh();

 

But am getting error stating undefined..can anyone please help on resolving the above errors.

 

 

 

 

I have the same question (0)
  • Verified answer
    Guido Preite Profile Picture
    1,490 Super User 2024 Season 1 on at

    you should share the whole code, the error maybe is caused by not getting the formContext from the executionContext (and the "pass context as first parameter" option should be checked in the event binding)

  • cchannon Profile Picture
    4,702 Moderator on at

    window.parent is an example of unsupported DOM browsing. I would guess you are trying to take this action from within a web resource of some kind on the form and you are trying to reach up into the form context to take actions.

     

    There are ways to make this work through trial and error, but it is strictly unsupported by MSFT because they make DOM changes on forms all the time. Even if you get it working like this, someday it would most likely break because of a product release. Instead, you should consider using a PCF to accomplish whatever it is you are doing in your web resource. PCFs have the ability to interact with forms on a much closer level; accessing the webapi, updating form elements, etc. Learn more about PCFs and options for interacting with forms here.

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

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 610

#2
Haque Profile Picture

Haque 317

#3
WarrenBelz Profile Picture

WarrenBelz 315 Most Valuable Professional

Last 30 days Overall leaderboard