locked
Implementing Rounding RRS feed

  • Question

  • Hi,

    I have a custom entity that I have copied the Rounding Policy/Amount/Option fields to from the Product Price List.  Now I want to implement these rounding like it does in the standard Product Price List when you create a Quote, for example.  I've been hunting around the SDK and through all the CRM scripts and I can't see where CRM does this.

    Can someone point me in the right direction?

    Thanks,

    Craig
    Thursday, November 12, 2009 9:39 PM

Answers

  • Hi Craig,

    In that case, you most likely need to use plugin to do it. I have done it in one of my projects, as we deal with rounding of tax which is basically rounding up instead of rounding to nearest, the default rounding of MSCRM software.

    Cheers,

    Daniel Cai | http://danielcai.blogspot.com
    Thursday, November 12, 2009 10:50 PM
  • well you need to use plug in /custom workflow to achieve this... please check following link which might help you write some rounding code in c sharp..

    http://geek.hubkey.com/2009/02/rounding-to-nearest-1000-in-c.html


    hope this helps..
    Thursday, November 12, 2009 10:52 PM
    Answerer
  • Unfortunately, you cannot simply reuse what CRM has implemented for Product - Price List - Quote / Order entities, it's quite complex thing and definitely involves a lot of C# code which is kinda the core engine of CRM platform's Sales Automation. It won't be just one piece of JS code that you can simply borrow.

    Go with plugin, you should be good. I have done something similar, even a lot more complex, which involves inventory allocation and management, price overriding, etc. Be aware, it's going to be a lot of work.

    Cheers,


    Daniel Cai | http://danielcai.blogspot.com
    Thursday, November 12, 2009 11:22 PM

All replies

  • Please have a read regarding this article.

    Thursday, November 12, 2009 10:03 PM
    Answerer
  • Sorry but that just describes how normal rounding is done in CRM.  What about if I set rounding Policy to "Down" and Rounding Option to "MultipleOf" and then Rounding Amount to "5" so that it rounds $1,234.56 to $1,230.00

    Craig
    Thursday, November 12, 2009 10:25 PM
  • Hi Craig,

    In that case, you most likely need to use plugin to do it. I have done it in one of my projects, as we deal with rounding of tax which is basically rounding up instead of rounding to nearest, the default rounding of MSCRM software.

    Cheers,

    Daniel Cai | http://danielcai.blogspot.com
    Thursday, November 12, 2009 10:50 PM
  • well you need to use plug in /custom workflow to achieve this... please check following link which might help you write some rounding code in c sharp..

    http://geek.hubkey.com/2009/02/rounding-to-nearest-1000-in-c.html


    hope this helps..
    Thursday, November 12, 2009 10:52 PM
    Answerer
  • Thanks but what I really want to know is how CRM does it now.  You can set all that up within Price Lists and then on a Quote for example it does this rounding.  I just wanted to see if it was a peice of JS or something lying around that I can use.  If its a plugin that MS uses it doesn't show up on the Plugin deployment.

    Also it works on all quotes instantaneously if you change the rounding options on the price list.

    Craig
    Thursday, November 12, 2009 11:13 PM
  • Unfortunately, you cannot simply reuse what CRM has implemented for Product - Price List - Quote / Order entities, it's quite complex thing and definitely involves a lot of C# code which is kinda the core engine of CRM platform's Sales Automation. It won't be just one piece of JS code that you can simply borrow.

    Go with plugin, you should be good. I have done something similar, even a lot more complex, which involves inventory allocation and management, price overriding, etc. Be aware, it's going to be a lot of work.

    Cheers,


    Daniel Cai | http://danielcai.blogspot.com
    Thursday, November 12, 2009 11:22 PM