RE: How to refresh a parent form after a plugin is executed on a child window?
If the child record (quoteProduct) that got updated appears in a grid view on the form of the parent record, and the updated column is exposed and visible in that grid, you can use JavaScript to monitor the grid for any changes on a set interval.
Then, upon detecting a change to the grid, you can refresh auto-save the parent form (quote) which will result in the updated values displaying.
The code snippet below may be helpful as a starting point. I do something similar with a child price adjustment record, and when the price adjustment is modified or a new one is created, the change to the grid gets detected by the JavaScript that does the polling, which then triggers the refresh save on the parent form.
function AutoPollCheckPriceAdjustmentSave(executionContext, gridName) {
var formContext = executionContext.getFormContext();
var theInitialPriceAdjustment = GetInitialPriceAdjustment(executionContext);
// debugger;
setInterval(function () {
// debugger;
var initialPriceAdjustmentVariable;
return theInitialPriceAdjustment.then(function (initialPriceAdjustment) {
//return jobAlertDialog(initialEstimate);
initialPriceAdjustmentVariable = initialPriceAdjustment;
return initialPriceAdjustment;
}).then(function (iPriceAdjustment) {
return CheckPriceAdjustmentChangeCompareToInitial(executionContext, initialPriceAdjustmentVariable);
}).then(function (resultOfCheckPriceAdjustmentChangeCompareToInitial) {
return PerformTheRefreshProcess(executionContext, resultOfCheckPriceAdjustmentChangeCompareToInitial);
});
}, 5000);
}