web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

How to refresh a parent form after a plugin is executed on a child window?

(0) ShareShare
ReportReport
Posted on by

I have a plugin that updates a value in the quote form this plugin is fired when i create a new line in the kendo,
this plugin is not for the entity quote its for another entity "quoteProduct",
I need to refresh the quote form after this plugin runs without having to close and reopen the form to see the update. Is this possible ?

I have the same question (0)
  • Suggested answer
    Pawar Pravin  Profile Picture
    5,237 on at
    RE: How to refresh a parent form after a plugin is executed on a child window?

    Hi Saiid SK,

    You wont be able to refresh page after plugin execution. If you want to refresh I would suggest to use custom action.

    Please refer below url:

    pravinpawarweb.wordpress.com/.../  

  • Verified answer
    ACECORP Profile Picture
    1,589 on at
    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);
    
    }

  • Suggested answer
    sdfasdf Profile Picture
    840 on at
    RE: How to refresh a parent form after a plugin is executed on a child window?

    The only way to refresh the form is using JavaScript: docs.microsoft.com/.../refresh

  • WCL Profile Picture
    140 on at
    RE: How to refresh a parent form after a plugin is executed on a child window?

    What the other answers don't point out is why you can't get a direct refresh from your plugin. The plugin is running on the server as a CRM Async process - so has no direct connection to the client browser session. The solutions you have been offered in this thread all offer workarounds around this.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 247

#2
Tom_Gioielli Profile Picture

Tom_Gioielli 166 Super User 2025 Season 2

#3
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 164

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans