{"id":1680,"date":"2015-08-27T14:46:21","date_gmt":"2015-08-27T09:16:21","guid":{"rendered":"https:\/\/www.inogic.com\/blog\/?p=1680"},"modified":"2015-08-27T14:46:21","modified_gmt":"2015-08-27T09:16:21","slug":"price-list-selection-logic-available-starting-dynamics-crm-2015-update-1","status":"publish","type":"post","link":"https:\/\/www.inogic.com\/blog\/2015\/08\/price-list-selection-logic-available-starting-dynamics-crm-2015-update-1\/","title":{"rendered":"Price List selection logic available starting Dynamics CRM 2015 Update 1"},"content":{"rendered":"<p><strong>Introduction<\/strong><\/p>\n<p style=\"text-align: justify;\">Traditionally Price List in any of the transactions like Opportunities, Quote, Orders or Invoices was set by reading it from Customer. If there was no price list set for the customer, it would be left blank and the user would be required to set it manually. Price List is critical and needs to be set since the line items on these transactions depend on the Price List selected. You are only able to add Products that have prices defined in the selected price list.<\/p>\n<p style=\"text-align: justify;\">With the new release Microsoft has shipped in automation to process of setting Price List on these.<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>Price List Based on Territory<\/strong><\/span><\/p>\n<p style=\"text-align: justify;\">Another way to associate Price List that has been introduced in Update 1. In this Price List needs to be associated with Territory and User is associated with a Territory. The Price List would be set based on the logged in user\u2019s territory if there is no default Price List set for the customer.<\/p>\n<p>By default this feature is activated in all new CRM Online trials. You can check the settings in Settings windows.<a href=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2015\/08\/price-list.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-1681\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2015\/08\/price-list.png\" alt=\"price list\" width=\"543\" height=\"347\" \/><\/a>Next step is to associate Territories with Price List through Territory grid available in Price List (which is essentially connections re-purposed). You now find an OOB Connection role Territory Default Price List. Make sure to create the connection from within the Price List.<a href=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2015\/08\/price-list1.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-1682\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2015\/08\/price-list1.png\" alt=\"price list1\" width=\"525\" height=\"205\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">Associate this territory with the User.<\/p>\n<p style=\"text-align: justify;\">Now when a new Opportunity is created, and the customer does not have a default Price List set, it would be read from the Territory Default Price List connection.<a href=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2015\/08\/price-list2.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-1683\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2015\/08\/price-list2.png\" alt=\"price list2\" width=\"372\" height=\"222\" \/><\/a><\/p>\n<p style=\"text-align: justify;\"><em><strong>Note:<\/strong> If more than one price list is associated with a territory, then the price list is not populated. This should be enhanced to allow associating multiple pricelists with a territory for with a unique pricelist for each currency.<\/em><\/p>\n<p style=\"text-align: justify;\"><em>The region NA may need to serve customers in America as well as Canada and create opportunities in both these currencies. Depending on the currency of the customer, the Price List should be set from the territory.<\/em><\/p>\n<p style=\"text-align: justify;\"><em>If you have only one currency price list associated with a Territory and you try to create an opportunity for a customer in another currency you receive the following error<a href=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2015\/08\/price-list3.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-1684\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2015\/08\/price-list3.png\" alt=\"price list3\" width=\"271\" height=\"134\" \/><\/a><\/em><\/p>\n<p><span style=\"text-decoration: underline;\"><strong>Price List Based on Custom Logic<\/strong><\/span><\/p>\n<p>Another way to get the Price List for an Opportunity is through custom plugin. We now have a new message \u201c<strong>GetDefaultPriceLevel<\/strong>\u201d available on which Plugin can be registered.<\/p>\n<p>Here is a snippet of how the pricelevel can be passed through the plugin<\/p>\n<p>public void Execute(IServiceProvider serviceProvider)<\/p>\n<p>{<\/p>\n<p>try<\/p>\n<p>{<\/p>\n<p>IPluginExecutionContext pluginExecutionContext = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext));<\/p>\n<p>IOrganizationServiceFactory organizationServiceFactory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));<\/p>\n<p>\/\/get the collection of price list based on your business requirement<\/p>\n<p>EntityCollection priceListcoll = GetPriceList(organizationService);<\/p>\n<p>\/\/pass the price list collection to the output parameter<\/p>\n<p>pluginExecutionContext.OutputParameters[&#8220;BusinessEntityCollection&#8221;] = coll;<\/p>\n<p>}<\/p>\n<p>catch (FaultException&lt;OrganizationServiceFault&gt; ex)<\/p>\n<p>{<\/p>\n<p>throw new InvalidPluginExecutionException(&#8220;Execute: &#8221; + ex.Message);<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p style=\"text-align: justify;\">Register this plugin on <strong>GetDefaultPriceLevel<\/strong>. This will override the Price List selection on Opportunity, Quote, Order and Invoice as well.<a href=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2015\/08\/price-list4.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-1685\" src=\"https:\/\/www.inogic.com\/blog\/wp-content\/uploads\/2015\/08\/price-list4.png\" alt=\"price list4\" width=\"579\" height=\"300\" \/><\/a><\/p>\n<p style=\"text-align: justify;\"><strong>Note:<\/strong> Make sure to return only a single Price List in the collection in output parameter. If you return more than one, the Price List will not be set.<\/p>\n<p style=\"text-align: justify;\"><strong>Conclusion:<\/strong><\/p>\n<p style=\"text-align: justify;\">Similar to the enhancement where the Pricing logic could be overridden using the <strong>CalculatePriceRequest<\/strong> Message, we now have the ability to select the Price List based on which the Pricing can be calculated.<\/p>\n<p style=\"text-align: justify;\">There\u2019s much more. For any assistance in implementation, customization, migration or upgradation of Dynamics CRM, get in touch with us on\u00a0<a href=\"mailto:crm@inogic.com\" target=\"_blank\" rel=\"noopener noreferrer\">crm@inogic.com<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Traditionally Price List in any of the transactions like Opportunities, Quote, Orders or Invoices was set by reading it from Customer. If there was no price list set for the customer, it would be left blank and the user would be required to set it manually. Price List is critical and needs to be\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.inogic.com\/blog\/2015\/08\/price-list-selection-logic-available-starting-dynamics-crm-2015-update-1\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":13,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[15,23,24,42,50],"tags":[600,1361],"class_list":["post-1680","post","type-post","status-publish","format-standard","hentry","category-development","category-dynamics-crm-2015-update-1","category-dynamics-crm-2016","category-plugin","category-sales-2","tag-dynamics-crm-2015-update-1","tag-price-list-selection-in-dynamics-crm"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/1680","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/comments?post=1680"}],"version-history":[{"count":0,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/posts\/1680\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/media?parent=1680"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/categories?post=1680"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inogic.com\/blog\/wp-json\/wp\/v2\/tags?post=1680"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}