-
Continue reading →: Reading Querystring using Jscript
Hi, Below is the Jscript function to parse query string (i.e., In to Parameter & Value pair) // Read querystring and returns Parameter & Value pair Array function fetchQueryStringParams() { var qrStr = window.location.search; var spQrStr = qrStr.substring(1); var arrQrStr = new Array(); // splits each of pair var arr…
-
Continue reading →: You must use the Role Management Tool to install .Net Framework Exception
Hi, Today I got below error screen when I try to install .Net 3.5 Framework SP1 on my WIN 2008 R2 server . Reason :- Windows 2008 R2 natively ships with the .NET 3.5 SP1 framework. So, it wont allow us to run the .Net 3.5 framework setup file. Workaround :- As Windows 2008…
-
Continue reading →: Fetching user security roles using Linq in CRM 2011 Plug-in’s
Hi, Below is the sample code to fetch the User’s security roles based on the “User Id” in the Plug-in’s using Linq /// <summary> /// Returns the list of User security role names /// </summary> private List<string> GetUserRoles(IOrganizationService service, Guid userId) { // Create Query Expression to fetch Role Entity var query = new QueryExpression…
-
Continue reading →: Setting default view using Plug-in’s in CRM 2011
Hi, We often get the requirement to set a default view based on some criteria (Ex – Could be based on logged in user role, etc…). We can achieve this using a Plug-in. Little insight :- When you click on an entity (i.e., ‘Contacts’ in my sample) in CRM application, In…
-
Continue reading →: How to Debug Plug-Ins in CRM
Hi, Sometimes you might get wonder (even frustrated) why the debugger is not hitting the break point in your Plug-In code file. Below are the Checklist to perform prior to start the debugging of your Plug-in assembly. Ensure that your plug-in assembly is signed (See) Rebuild the plug-in assembly Reset the IIS (i.e. Open…
-
Continue reading →: Auto numbering logic in CRM 2011
Hi, Auto numbering feature is one of the most frequently asked requirement in CRM projects and below is the sample. In my sample, I am going to generate an auto number to the each ‘Contact’ that create under a particular ‘Account’. The auto number format will be “Contact – 001, Contact – 002,….”. To achieve the above requirement, I am…
-
Continue reading →: Entities display area not getting set on Solution Import in CRM 2011
Hi, Please observe below scenario In my CRM organization “ORG – A I Created a new custom entity “new_city” and I set “Area to display” as “Workplace”. I created a new “Managed” solution “Sol – I” having the custom entity “new_city” Now In my Organization “ORG – B”, I imported the solution “Sol – I” successfully. Issue…
-
Continue reading →: Bulk Updating or Inserting records from Excel using CRM Data Import
Hi, In CRM, you may come across scenarios where you need to Update/Insert a very large number of records very quickly. In these cases, opening each record’s form to make the change can be time-consuming. We can handle this better by using CRM Data Import feature by which we can make…
-
Continue reading →: “The context is not currently tracking the entity” exception in CRM 2011
Hi, You may come across below exception when you are trying to Create/Update child record in the Parent record context of Plug-in using XRM Linq Scenario :- Imagine you have registered a “Post Update” Plug-in on ‘Account’ entity which Updates an associated ‘Contact’ entity Here the Plug-in runs under Parent Entity Context (i.e., Account)…
-
Continue reading →: “Object of type can not be converted to type ‘IBusinessEntity’ ” exception with crm Early Binding
Hi, You may come across below exception in Plug-Ins, while performing Create/Update operation using CRM early binding Exception: Unhandled Exception: System.InvalidOperationException: Object of type ‘entity_name‘ can not be converted to type ‘IBusinessEntity’ Fix :- You need to add below line in your Plug-in project’s “AssemblyInfo.cs” file (Navigate to project folder and go…


