Dear all.
Microsoft Dynamics 365. Version 1612 (9.0.8.9).
I am facing a problem with customising a subgrid, adding an event handler OnLoad.
I add an OnLoad event handler to the subgrid.
The addition occurs when the form is loaded on the OnLoad event of the form, using the technique described in the documentation.
docs.microsoft.com/.../addonload
The handler is added successfully and works. But after adding the OnLoad handler, the presence of the "Plus button" on the subgrid becomes unstable.
In other words: it is impossible to predict the presence of the "Plus Button" on the subgrid, with each new loading of the form, if the OnLoad handler for the grid is added.
Sample code:
OnLoad: function (executionContext) {
var formContext = executionContext.getFormContext(); // get the form context
var gridContext = formContext.getControl("Contacts");// get the grid context
var myContactsGridOnloadFunction = function () {
console.log("Contacts Subgrid OnLoad event occurred")
};
gridContext.addOnLoad(myContactsGridOnloadFunction);
}
SubGrid Image:

Please help..
Thanks.