This article explains how to pass the parent form ID and selected record IDs from a subgrid command button in Model-driven Power Apps. The process involves creating a JavaScript function that takes two parameters: the parent record ID and the selected record IDs. Then, in the Model Driven App, you need to edit the command bar, select the subgrid command for the child entity, and add a new command that calls the JavaScript function with the parameters. Finally, publish the Command and Model Driven App, and when you click the command button in the subgrid, you will see two alerts displaying the parent record ID and selected record IDs.
Login now to access my digest by 365.Training