Having a large number of products under a price list means, there are large amount of price list items associating with them. Whenever a new price list is added to the CRM, price lists items are to be created even if the prices are same in that price list.
“Copy Price List” is to duplicate an existing price list with a new name, new start date and a new end date with its price lists items. If there are any changes to be done to any price list items users can do that manually while the other items remaining the same.
Source Code and the Managed Solution available in CODEPLEX
The solution is perfect when a system has large number of products with many price lists adding but price list items are getting rarely changes. This has packaged to work with CRM 2015 directly but using the source code that can be used with previous versions of CRM as well.
Go through the following the steps to install it and use it !
Continue reading “Dynamics CRM 2015 Copy Price List”
Not like in most of the other developments, in Plugins developers have to debug the CRM plugin code at the time of running the application. Developers writing the plugin code inside the plugin and some times the logic can be write in a seperate assembly and from the plugin code it can be invoked. When writing the whole logic inside the plugin is little complex to test the plugin logic by debugging the plugin as it executes from the application itself in a given event such as create an entity, update or delete.
There are two ways of debugging a CRM plugin as follows,
 Attaching the debugger to the w3p.exe process
 Forcing the add-in to call the debugger
A plugin has written targeting Account entities as follows and a step has registered to be fired on Account entity’s Create step.
Continue reading “Debugging a Plug-in”
Convert DateTime to a string with a relevent format
var usCultureInfo = new CultureInfo ("en-US", false);
var date = new DateTime (2012, 3, 22, 15, 6, 0);
date.ToString ("MM/dd/yy", usCultureInfo);
Binding data from a Dictionary is not so challenging as “Key” and “Value” pairs can be used for the drop down list properties. Following code samples show the results after assigning data source to the drop down list.
Dictionary genderDictionary = new Dictionary();
this.ddlGender.DataSource = genderDictionary;
Continue reading “Binding a Dictionary to a Drop Down List”
private static String GetServerUrlFromCrmContext()
// If the Silverlight is in a form, this will get the server url
ScriptObject xrm = (ScriptObject)HtmlPage.Window.GetProperty("Xrm");
if (xrm != null)
ScriptObject page = (ScriptObject)xrm.GetProperty("Page");
ScriptObject pageContext = (ScriptObject)page.GetProperty("context");
String serverUrl = (String)pageContext.Invoke("getServerUrl");