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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Closing Popup form ope...
Power Apps
Unanswered

Closing Popup form opened from subgrid

(0) ShareShare
ReportReport
Posted on by 274

Use case: Our users are going to need to answer questions from a subgrid and therefore need a means to work through the questions without having to scroll back to their starting point.  The idea is use a popup form for the Inspection Questions and when the question is answered or closed they are still at the same position on the Assessment subgrid.  Ideally, the colors used for the scores would show up on the subgrid, when refreshed.

Question: Is there a JavaScript that can open a popup form w/in a model driven app, using a Power App grid control?

Research: Clicking on a Subgrid to Open a Modal Form in Dynamics 365 - Carl de Souza

Testing with a Power App grid control, which shows the colors from my choices, fails to execute the JavaScript code below.  The code works when I use an Editable grid (as recommended in the video).

 

function RunOnSelected(executionContext) {
var selected = executionContext.getFormContext().data.entity;
var Id = selected.getId();
 
var pageInput = {
pageType: "entityrecord",
entityName: "contact",
entityId: Id
};
var navigationOptions = {
target: 2,
height: {value: 50, unit:"%"},
width: {value: 50, unit:"%"},
position: 1
};
Xrm.Navigation.navigateTo(pageInput, navigationOptions).then(
function success() {},
function error() {}
);
}

 

Visual that the JavaScript is on and works from using the editable grid.  Visually, I'd like to get the choice colors to show up and I only know how to do that we a "power app grid control" but then the popup script doesn't work.

damian_green23_0-1709604338306.png

 

I have the same question (0)
  • Rahman1005 Profile Picture
    109 on at

    Hi,

    Could you please refer below bog.

    https://crmnewlearning.blogspot.com/2022/05/open-canvas-app-with-customize-command.html

  • damian_green23 Profile Picture
    274 on at

    That works for a canvas app.  What about a model driven one?

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard