Hi,
There are two common ways to run a business logic on subgrid record change:
- Register a JavaScript function on load of a sub-grid.
- Register a workflow/plugin after a record updated in a sub grid (however this runs on server side) .
This how to register a JS function on sub grid on load event:
https://docs.microsoft.com/en-us/previous-versions/dynamicscrm-2016/developers-guide/dn932126(v=crm.8)?redirectedfrom=MSDN#BKMK_subgridAddOnLoad
Now coming to your question, if i understood your problem, you are trying to look for a code executing on a sub-grid record update.
As i said, there are 2 common ways to do so. Let me put some light on it.
Executing a Java Script onChange event is different than a plugin, here is a quick explanation:
- On Form Scripting:
- You can register java script functions on following events:
- On Load of Form
- On Save of Form
- On Change of a field
- On Load of Subgrid
Please note, form scripts are executed only when you use D365 UI, because it is Java Script it is considered as front-end scripting (code is not executed on the Server). The code for these can be find in one of the form libraries.

- Server Side Business Logic:
- You can implement business logic on server side (which is triggered on an event or on demand). There are 2 common approaches:
- Workflow or Microsoft Flow: these can be executed on a record created, change, delete, assignment and on-demand. These can be viewed/modified easily by using Workflow or Flow editor.
To view/edit a workflow: go to Advanced Settings -> Process Center -> Processes. You can find an active process (workflow) for target entity.
To view/edit a Flow: go to Advanced Settings -> Process Center -> Microsoft Flows.
-
-
- Plugin: these are assemblies registered on SDK Messages provided by D365 (create, update, delete, assign. share, etc.). Plugins are written in C# .Net and are registered using plugin registration tool.
You cannot see a plugin code using Plugin Regeneration Tool. This tool allows you to register a plugin assembly and register steps (triggers). You can add/disable steps using this tool, but for the code you need to open .Net Solution and see Class Library Code.
I would suggest, you provide more details on the scenario to sort it out.
Hope this clarifies.
Best,
Wahaj
(if it helps, mark it verified)