• About
    • Who We Are
    • What We Do
    • The Management Team
    • Global
  • Service
    • Microsoft Dynamics 365 CRM Development
    • Cloud Technology Services
    • Business Central Development Services
    • Business Intelligence Development Services
    • Enterprise Content Search Services
  • Solutions
    • Business Systems Consulting
    • Enterprise Resource Planning (ERP)
      • Wiise Business Central
    • Customer Engagement (CRM) & Marketing Automation
    • Rapid Application Development (PowerApps)
      • HSE App by ECLEVA
    • Process Automation (RPA)
    • Business Intelligence (Power BI)
  • Sectors
    • Corporate & SME
    • Not-For-Profit
    • Construction
    • Financial Services
    • Education
    • Manufacturing
    • Government
  • Customer Stories
  • Insights
    • Blog
    • News
    • Videos
  • Contact
    • Contact ECLEVA
    • Customer Support
+61 2 9467 9300
Get in touch
  • About
    • Who We Are
    • What We Do
    • The Management Team
    • Global
  • Service
    • Microsoft Dynamics 365 CRM Development
    • Cloud Technology Services
    • Business Central Development Services
    • Business Intelligence Development Services
    • Enterprise Content Search Services
  • Solutions
    • Business Systems Consulting
    • Enterprise Resource Planning (ERP)
      • Wiise Business Central
    • Customer Engagement (CRM) & Marketing Automation
    • Rapid Application Development (PowerApps)
      • HSE App by ECLEVA
    • Process Automation (RPA)
    • Business Intelligence (Power BI)
  • Sectors
    • Corporate & SME
    • Not-For-Profit
    • Construction
    • Financial Services
    • Education
    • Manufacturing
    • Government
  • Customer Stories
  • Insights
    • Blog
    • News
    • Videos
  • Contact
    • Contact ECLEVA
    • Customer Support
+61 2 9467 9300
Get in touch
  • About
    • Who We Are
    • What We Do
    • The Management Team
    • Global
  • Service
    • Microsoft Dynamics 365 CRM Development
    • Cloud Technology Services
    • Business Central Development Services
    • Business Intelligence Development Services
    • Enterprise Content Search Services
  • Solutions
    • Business Systems Consulting
    • Enterprise Resource Planning (ERP)
      • Wiise Business Central
    • Customer Engagement (CRM) & Marketing Automation
    • Rapid Application Development (PowerApps)
      • HSE App by ECLEVA
    • Process Automation (RPA)
    • Business Intelligence (Power BI)
  • Sectors
    • Corporate & SME
    • Not-For-Profit
    • Construction
    • Financial Services
    • Education
    • Manufacturing
    • Government
  • Customer Stories
  • Insights
    • Blog
    • News
    • Videos
  • Contact
    • Contact ECLEVA
    • Customer Support
  • About
    • Who We Are
    • What We Do
    • The Management Team
    • Global
  • Service
    • Microsoft Dynamics 365 CRM Development
    • Cloud Technology Services
    • Business Central Development Services
    • Business Intelligence Development Services
    • Enterprise Content Search Services
  • Solutions
    • Business Systems Consulting
    • Enterprise Resource Planning (ERP)
      • Wiise Business Central
    • Customer Engagement (CRM) & Marketing Automation
    • Rapid Application Development (PowerApps)
      • HSE App by ECLEVA
    • Process Automation (RPA)
    • Business Intelligence (Power BI)
  • Sectors
    • Corporate & SME
    • Not-For-Profit
    • Construction
    • Financial Services
    • Education
    • Manufacturing
    • Government
  • Customer Stories
  • Insights
    • Blog
    • News
    • Videos
  • Contact
    • Contact ECLEVA
    • Customer Support

Blog

Home Uncategorized Custom price calculations in CRM 2015
IT

Custom price calculations in CRM 2015

May 15, 2019

In our last few discussions we have focused on the Product Catalog enhancements. And in this discussion we will look at the Custom Price Calculation feature, which is related to the Product Catalog enhancement.

 

As we know, the pricing engine in Microsoft Dynamics CRM supports a standard set of pricing and discounting methods. These standard fields and methods might be a limitation on your business depending on your specific requirements for applying taxation, discounts, and other pricing rules for your products.

 

Suppose we need to identify and apply additional Taxes, like GST, VAT, Stamp Duty, or state and federal taxes independently on each line items. This would have been very difficult to achieve in previous versions of Dynamics CRM, because only one Tax field on line items was available. If we created custom fields for additional taxes, then it was really hard to include those in the calculation of the Extended Amount on each line item.

 

But now it is easy in CRM 2015, we can apply the Custom Price Calculation on the following entities.

  1. Opportunity
  2. Opportunity Product
  3. Quote
  4. Quote Product
  5. Order
  6. Order Product
  7. Invoice
  8. Invoice Product

To use the custom pricing for your opportunities, quotes, orders, and invoices, you need to do the following things:

 

  1. Set the value of the OOBPriceCalculationEnabled attribute to false from System Settings, as shown below.
  1. Create a plug-in that contains your custom pricing logic for calculating the price for your opportunity, quote, order, or invoice and on corresponding line items.
  2. Register the plug-in on the CalculatePrice message on Post stage.

When the OOBPriceCalculationEnabled attribute is set to 0, every time an opportunity, quote, order, or invoice is created or changes, the plug-in registered on the CalculatePrice executes to calculate prices as specified in your custom code in the plug-in. The CalculatePriceRequest message doesn’t have any usage scenario of its own. It’s exposed so that you can plug in your own custom pricing calculation logic if you don’t want to use the out-of-box pricing provided by CRM.

 

If you want to revert to using the out-of-box pricing for your opportunities, quotes, orders, and invoices, set the value of the OOBPriceCalculationEnabled attribute to True.

 

We had one scenario in which we need to apply the GST and VAT based on the Amount and calculate the Extended Amount on the Quote Product, as shown below.

As you can see in the above screen shot, we are calculating GST and VAT based on the Amount, and all taxes have been included in calculating the Extended Amount.

 

For example, we used the following logic in our plug-in.

decimal total = 0;

decimal vat = 0;

decimal gst = 0;

decimal extended = 0;

 

total = total + ((decimal)e[“quantity”] * ((Money)quoteItem[“priceperunit”]).Value);

gst = total * (decimal)0.08;

vat = total * (decimal)0.1;

extended = total + gst + vat;

quoteItem[“baseamount”] = new Money(total);

quoteItem[“tax”] = new Money(gst);

quoteItem[“new_vat”] = new Money(vat);

quoteItem[“extendedamount”] = new Money(extended);

 

service.Update(quoteItem);

And we have registered that plug-in on Post stage of CalculatePrice Message of Quotedetail, as shown below.

If you want to implement the Custom Pricing calculation, then you can use the sample plug-in which is provided by Microsoft, and that will really help you and save your lot of time. Below I have given the URL of that plug-in example.

 

https://msdn.microsoft.com/en-us/library/dn817877.aspx

 

Again below we have given some important facts about the custom pricing calculations.

 

  1. You must set the OOBPriceCalculationEnabled value to False to enable the custom pricing calculation.
  2. You must register the plug-in on the Post Stage of the CalculatePrice message.
  3. Once you have enabled the custom pricing calculation, then the Amount and Extended Amount on line items and all totals on headers will no longer be system calculated. And you have to register your plug-in for these calculations.
  4. Also one most important thing is that, it seems that when you enable the Custom Pricing, then the calculation happens in asynchronous mode, hence you need to refresh the form to view the changes, if you change Price or Quantity within line items.
CRM CRM 2015 product changes Custom Price Calculations
116
Product localization in CRM 2015Product localization in CRM 2015May 15, 2019
How to get fast value from your IT projectMay 15, 2019How to get fast value from your IT project
Categories
  • Blog (38)
    • AI (1)
    • Business (8)
    • Business Intelligence​ (3)
    • Digital Transformation (7)
    • IT (21)
    • Marketing (1)
  • News (18)
    • Business (11)
    • IT (5)
    • Sales (2)
  • Video (34)
    • Business (29)
    • Business intelligence (3)
    • Digital transformation (18)
    • IT (23)
    • Process automation (2)
Recent Posts
  • Developing Intelligent Supply Chains with Microsoft Dynamics 365 for Supply Chain Management
  • Integrating Power Apps with Sharepoint for Document Management Solutions
  • Integrating Dynamics 365 with Microsoft Azure for Scalable Cloud Solutions
  • Integrating Power BI with Dynamics 365 for Powerful Business Insights
  • How to build a Business Case for Robotic Process Automation (RPA)

 

ECLEVA
© ECLEVA 2025.

All rights reserved.
Privacy Policy

Solutions

Business Systems Consulting

Customer Engagement (CRM) & Marketing Automation

Rapid Application Development (PowerApps)

Process Automation (RPA)

Business Intelligence (Power BI)

Sectors

Corporate & SME

Not-for-profit

Construction

Financial Services

Education

Contact

Address:

100 Walker St.
North Sydney 2060

Phone:

+61 2 9467 9300

Address:

401-402, R M Arcade, Near Goverdhan Park, Taxsila School Road, Vastral, Ahmedabad 382418

Phone:

+91 98244 60130

Website:

www.ecleva.com

#integrio_button_68303f3d7d2ea .wgl_button_link { color: rgba(255,255,255,1); }#integrio_button_68303f3d7d2ea .wgl_button_link:hover { color: rgba(12,90,219,1); }#integrio_button_68303f3d7d2ea .wgl_button_link { border-color: rgba(255,255,255,1); background-color: rgba(49,49,49,0.01); }#integrio_button_68303f3d7d2ea .wgl_button_link:hover { border-color: rgba(255,255,255,1); background-color: rgba(255,255,255,1); }#integrio_button_68303f3d7d2ea.effect_3d .link_wrapper { color: rgba(255,255,255,1); }#integrio_button_68303f3d7ef3a .wgl_button_link { color: rgba(255,255,255,1); }#integrio_button_68303f3d7ef3a .wgl_button_link:hover { color: rgba(12,90,219,1); }#integrio_button_68303f3d7ef3a .wgl_button_link { border-color: rgba(255,255,255,1); background-color: rgba(49,49,49,0); }#integrio_button_68303f3d7ef3a .wgl_button_link:hover { border-color: rgba(255,255,255,1); background-color: rgba(255,255,255,1); }#integrio_button_68303f3d7ef3a.effect_3d .link_wrapper { color: rgba(255,255,255,1); }#integrio_button_68303f3d84883 .wgl_button_link { color: rgba(49,49,49,1); }#integrio_button_68303f3d84883 .wgl_button_link:hover { color: rgba(255,255,255,1); }#integrio_button_68303f3d84883 .wgl_button_link { border-color: rgba(12,90,219,1); background-color: rgba(49,49,49,0.01); }#integrio_button_68303f3d84883 .wgl_button_link:hover { border-color: rgba(12,90,219,1); background-color: rgba(12,90,219,1); }#integrio_button_68303f3d84883.effect_3d .link_wrapper { color: rgba(12,90,219,1); }#integrio_button_68303f3d862a0 .wgl_button_link { color: rgba(49,49,49,1); }#integrio_button_68303f3d862a0 .wgl_button_link:hover { color: rgba(255,255,255,1); }#integrio_button_68303f3d862a0 .wgl_button_link { border-color: rgba(12,90,219,1); background-color: rgba(49,49,49,0); }#integrio_button_68303f3d862a0 .wgl_button_link:hover { border-color: rgba(12,90,219,1); background-color: rgba(12,90,219,1); }#integrio_button_68303f3d862a0.effect_3d .link_wrapper { color: rgba(12,90,219,1); }#integrio_soc_icon_wrap_68303f3da5f48 a{ background: #0C5ADB; border-color: transparent; }#integrio_soc_icon_wrap_68303f3da5f48 a:hover{ background: #ffffff; border-color: #0C5ADB; }#integrio_soc_icon_wrap_68303f3da5f48 a{ color: #ffffff; }#integrio_soc_icon_wrap_68303f3da5f48 a:hover{ color: #0C5ADB; }.integrio_module_social #soc_icon_68303f3da5fa61{ color: #ffffff; }.integrio_module_social #soc_icon_68303f3da5fa61:hover{ color: #ffffff; }.integrio_module_social #soc_icon_68303f3da5fa61{ background: #44b1e4; }.integrio_module_social #soc_icon_68303f3da5fa61:hover{ background: #44b1e4; }.integrio_module_social #soc_icon_68303f3da5fd12{ color: #ffffff; }.integrio_module_social #soc_icon_68303f3da5fd12:hover{ color: #ffffff; }.integrio_module_social #soc_icon_68303f3da5fd12{ background: #0077b5; }.integrio_module_social #soc_icon_68303f3da5fd12:hover{ background: #0077b5; }