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

Community site session details

Session Id : 6tt1B9gtrN0Jgo42XahVan
Power Apps - Microsoft Dataverse
Unanswered

[Model Driven App] Open modal form when adding (+new) record from a subgrid?

Like (0) ShareShare
ReportReport
Posted on 7 Nov 2023 01:40:54 by

Hi,

 

Is it possible to open a model form when creating a new subgrid record? I know this is possible because MS itself does this in for example the Field Service module. But I cannot find a way to trigger an event from the +new button. I know its possible to create a button yourself and add the JS to that but I would prefer to avoid that and use only OOB.

 

MS's own documentation shows you can create a new record this way but doesn't mention how to trigger it from +new.


https://learn.microsoft.com/en-us/power-apps/developer/model-driven-apps/customize-entity-forms#open-main-form-in-a-dialog-using-clientapi

Categories:
I have the same question (0)
  • ChrisPiasecki Profile Picture
    6,414 Most Valuable Professional on 07 Nov 2023 at 02:01:42
    Re: [Model Driven App] Open modal form when adding (+new) record from a subgrid?

    Hi @NoName404,

     

    Unfortunately no out of the box no-code way to open a main form dialog from a sub grid. It's something I've wanted for sometime myself.

     

    If you have quick create enabled for the table, then you can create a new record using that, but of course we know quick create forms have some limitations. 

     

    ---
    Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.

  • NoName404 Profile Picture
    on 07 Nov 2023 at 23:20:26
    Re: [Model Driven App] Open modal form when adding (+new) record from a subgrid?

    I was afraid that would be the case. Kinda annoying its obviously possible because MS is doing it themselves but then they expose only half of what you need in the API...

     

    Its also not very consistent from a user pov. Why can you open the form in a dialog when selecting a record but not when creating a new record?

     

    I could use a quick create form but there is a bug (or feature...) that doesn't display embedded forms properly (only 1 line).

  • ivan_apps Profile Picture
    2,187 Moderator on 08 Nov 2023 at 01:25:43
    Re: [Model Driven App] Open modal form when adding (+new) record from a subgrid?

    Yes right now - OOB - you can open a new form dialog without code only from a Lookup column. MS hasn’t added that easy config option to open or create from dialog inside subgrids…yet.

    Like you mentioned, both dialogs are possible with JS code customizations but requires app support to have experience with these abilities when making changes in the future. The JS isn’t very complicated but to delete the subgrid’s +New and recreate it with your custom JS would take a bit of know-how. Ribbon Workbench does a great job at making it easy make this change but you’d have to carefully document it for future support.

  • Jonathan Manrique Profile Picture
    2,687 on 10 Nov 2023 at 08:27:07
    Re: [Model Driven App] Open modal form when adding (+new) record from a subgrid?

    Hi  @NoName404 

     

    The other option, if you want the main form to open from the new button of a subgrid, is to deactivate the creation of records with quick creation forms, that way the main form will always be used and you do not need to use code, you set it to table settings

     

    Jmanriquerios_0-1699604827366.png

     

     

    If I have answered your question, please mark your post as Solved.
    If you like my response, please give it a Thumbs Up.
    You can accept more than one post as a solution

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…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 629 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 397 Super User 2025 Season 2

#3
wolenberg_ Profile Picture

wolenberg_ 232 Moderator

Last 30 days Overall leaderboard

Featured topics

Loading started