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 / How to Register a Plug...
Power Apps
Unanswered

How to Register a Plugin on a Sub-Grid of a model-driven App

(0) ShareShare
ReportReport
Posted on by 56

I have made a model-driven app with a sub-grid and a BPF , I have also created a c# plugin .

The plugin is written to show pop up alert message when there are no necessary number of records based on the BPF stage , for eg. on the 2nd stage of BPF , IF there are no records in the sun-grid, a pop up should show telling that Add data in the sub-grid and so on for the rest of the BPF steps. { 3rd stage BPF,2 records in the sub-grid..........}. 

Also, an pop up needs to show if certain field in the BPF is not checked and prevent save if these 2 conditions are not satisfied

 

I have tested my code in the Console app and it works fine.

I just want to know how to register the plugin  in the model-driven app  ,  what should be the "General Configuration Information" for the step that I need to register to make the plugin work as required .

I have the same question (0)
  • bscarlavai33 Profile Picture
    752 Super User 2026 Season 1 on at

    You need a CRUD event to register the plugin against. It sounds like you might need to have javascript on load of your form and then use the javascript web api to query for the child records to do your validation.

    This article shows how to retrieve multiple records from javascript - https://learn.microsoft.com/en-us/power-apps/developer/model-driven-apps/clientapi/reference/xrm-webapi/retrievemultiplerecords

    This article shows to to display an alert from javascript - https://learn.microsoft.com/en-us/power-apps/developer/model-driven-apps/clientapi/reference/xrm-navigation/openalertdialog

     

  • Parvez Ghumra Profile Picture
    1,579 Moderator on at

    @Mayank_Yadav As @bscarlavai33 is suggesting, you first need to decide what is the actual event that triggers your intended plugin. Plugins on the server side, so you need to trigger them based on a server side event, such as the Creation, Update, Deletion or the Retrieval of a record of a table.

     

    JavaScript runs on client side in the browser, so you need to register your event handler on client side event such as the load of a record form, change of a field, load/refresh of a subgrid, change of BPF stage, etc.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 505

#2
WarrenBelz Profile Picture

WarrenBelz 502 Most Valuable Professional

#3
Haque Profile Picture

Haque 324

Last 30 days Overall leaderboard