Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Refresh Quote after adding product

(0) ShareShare
ReportReport
Posted on by

Hi,

I have a strange issue.  I'm trying to update quote with some calculations after adding a product.  I have a plugin that updates some number and a javascript that updates others.  I can combine them and add them in my plugin.

No matter what I do, I can't force a refresh of the quote after adding the product.  Is there a trick out there?  I tried js and workflows and nothing works.

The crazy part about it is that this used to work a couple of days ago, but I think it was just timing. 

*This post is locked for comments

  • Suggested answer
    Kokulan Profile Picture
    18,054 on at
    RE: Refresh Quote after adding product

    Hi Emad,

    I read your requirement and responses again, it looks like your plugin triggers on Pre/Post event of Quote Product not quote right. I dont think the quote main form will refresh as the quote change you are making in the plugin is not actually directly triggered by the quote form.

    I just tested the out of the box refresh feature when a quote is added, it uses a separate service to update the calculations when product added: AppWebServices/InlineEditWebService.asmx

    The following snippet is not a fully supported way of doing it but it might work.

    //Bind to add product refresh event

    document.getElementById("quotedetailsGrid").control.add_onRefresh(

    function ()

    {

      // This should refresh calculations on quote form

       Mscrm.GridControlLite.recalculateRecord();

    });

  • Suggested answer
    pavanmanideep Profile Picture
    1,331 on at
    RE: Refresh Quote after adding product

    Hi Emad,

    Alternately you can try to refresh the form after adding the product using Javascript functions for the data to show correctly. May be you added few more customizations on the form update recently which might be the issue.

    https://www.powerobjects.com/blog/2017/03/21/triggering-a-form-refresh-after-crm-dialog-is-closed/

  • Emad Hanna Profile Picture
    on at
    RE: Refresh Quote after adding product

    I have pre and a post and they both run because I see the data if I hit refresh.  So the plugins run, I'm trying to figure out how to refresh the quote so I can see the data.

  • Suggested answer
    Kokulan Profile Picture
    18,054 on at
    RE: Refresh Quote after adding product

    Could you share the details on when your plugin is triggered? i would throw an exception from plugin to see if its actually triggered

  • Emad Hanna Profile Picture
    on at
    RE: Refresh Quote after adding product

    Hi the plugin is Sync and the workflow is realtime.

  • Kokulan Profile Picture
    18,054 on at
    RE: Refresh Quote after adding product

    You plugin is Sync or Async? When you said you tried workflow, did you try real-time or background workflow?

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 52

#3
Victor Onyebuchi Profile Picture

Victor Onyebuchi 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans