web
You’re offline. This is a read only version of the page.
close
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

I have the same question (0)
  • Kokulan Profile Picture
    18,054 on at

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

  • Emad Hanna Profile Picture
    on at

    Hi the plugin is Sync and the workflow is realtime.

  • Suggested answer
    Kokulan Profile Picture
    18,054 on at

    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

    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
    pavanmanideep Profile Picture
    1,331 on at

    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/

  • Suggested answer
    Kokulan Profile Picture
    18,054 on at

    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();

    });

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans