Some Dynamics 365/CRM record updates need specific workarounds. Due to various reasons such as adding new fields to case entity, option set changes, migrating data to some other environments etc… developers need to modify the case records including resolved cases. This post is to explain a workaround for updating and migrating Resolved Case records.
Get resolved cases using views or advanced find.
Export all the resolved case records using Excel Online. Continue reading “Updating Resolved Cases in Dynamics 365”
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”
Auto numbering features are important in any business application to accomplish some business needs. Same in the CRM application and it needs additional customizations and plugin(or a custom workflow) to be implemented for the entity to statisfy auto numbering requirements. Jaimie Ji has a solution for this in CodePlex and this post is to demonstrate how to get use of Auto Numbering Solution in CRM. Advantage of the solution is that; developers dont need to write seperate plugins for each entity which needs auto numbering and it provides prefix, postfix, starting number and increment by features as well. Also it always open to change the configurations and no need any hard code values.
Unmanaged Solution (http://crm2011autonumber.codeplex.com/)
Auto Numbering Solution has a CRM solution and the solution contains one entity called “Counter” to save all the settings for all the counters. If there are two auto numbers in two different entities, just need only two records of this counter entity in the CRM application.
CRM.Plugin.SequenceGenerator is another component of the solution. If the solution doesnt contain the plugin, developers can get the source code from CodePlex, build it and can get the assembly registered in the CRM application manually.
There are some images as utilities to the Counter entity in the solution.
Source Code (http://crm2011autonumber.codeplex.com/SourceControl/list/changesets)
Source code contains the visual studio solution for the plugin. Developers can download the code, buil it and use the assembly for the registration. Plugin registration tool can be used to register the pluging in CRM application. The assembly can be attached to the CRM auto numbering solution and can be exported as a managed solution to be used in some other CRM projects.
Continue reading “CRM 2011 Autonumbering Solution”
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");