Dynamics CRM 2015 Copy Price List

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 … Continue reading Dynamics CRM 2015 Copy Price List

Debugging a Plug-in

Plugin is a .NET assembly that can be used to intercept events generated from the CRM system to perform a variety of actions. Some common plug-ins will perform a complicated update routine on CRM entities and\or attributes when it might be impractical to use Javascript or Workflow. Not like in most of the other developments, … Continue reading Debugging a Plug-in

Binding a Dictionary to a Drop Down List

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. Before Dictionary genderDictionary = new Dictionary(); genderDictionary.Add(1, “Male”); genderDictionary.Add(2, “Female”); genderDictionary.Add(3, “Transgender”); this.ddlGender.DataSource = genderDictionary; this.ddlGender.DataBind();

Get the CRM server url from Silverlight [If the silverlight page is in a form]

private static String GetServerUrlFromCrmContext() { try { // 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”); return serverUrl; } else { goto DevUrl; } } catch { goto DevUrl; … Continue reading Get the CRM server url from Silverlight [If the silverlight page is in a form]