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 / Closing Popup form ope...
Power Apps
Unanswered

Closing Popup form opened from subgrid

(0) ShareShare
ReportReport
Posted on by 276

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
    276 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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 483

#2
WarrenBelz Profile Picture

WarrenBelz 399 Most Valuable Professional

#3
11manish Profile Picture

11manish 327

Last 30 days Overall leaderboard