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.
That works for a canvas app. What about a model driven one?
Hi,
Could you please refer below bog.
https://crmnewlearning.blogspot.com/2022/05/open-canvas-app-with-customize-command.html
mmbr1606
22
Super User 2025 Season 1
stampcoin
17
Michael E. Gernaey
15
Super User 2025 Season 1