Posts

Showing posts from December, 2009

Modal Window redraws itself on postback

This is a known issue with IE 7/8, that a window opened using window.showModalDialog redraws itself upon postback. The solution to this problem is that the following statement be added to the <head> tag of the page: <base target = "_self" /> This should do the trick.

Error message when you try to log on to the Microsoft Dynamics CRM Web site from the Microsoft Dynamics CRM 4.0 server: "Request IP Address has differ

Recently on a IFD deployment, i faced this issue "Request IP Address has different address family from network address". I got to know from ( here ) that this is a knows issue. When you try to log on to the Microsoft Dynamics CRM Web site from the Microsoft Dynamics CRM 4.0 server, you receive the following error message: Request IP Address has different address family from network address. This problem occurs if the following conditions are true: 1. You run Microsoft Dynamics CRM 4.0 on a Windows Server 2008-based computer. 2. You use Internet-Facing Deployment (IFD) for Microsoft Dynamics CRM 4.0. The fix for this is simple as posted here . Open your hosts files ( :\windows\system32\drivers\etc\hosts) and add a line for your server name there with an IPv4 address. Reset IIS and this is it. This solves the problem. :) I hope this helps!!

Unauthorized 401 status error after deploying custom web application

Very recently while working on custom solution deployment on ms crm 4.0, i encountered a 401 Unauthorized error. The web site was deployed to work On-Premise and was deployed as a new virtual directory within the ISV folder, authentication was set to integrated windows authentication. I recieved the following error though the login credentials used were correct. Server Error in '/ISV/CustomApplication' Application. The request failed with HTTP status 401: Unauthorized. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Net.WebException: The request failed with HTTP status 401: Unauthorized.Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. St...

Custom message on the web page during server side processing

Recently, while working on MS CRM based solution, I encountered a typical aspx page loading issue. I had added a button in ISV config of my custom entity, which would load an aspx page. There was a code block on the page load which would fetch records from the server and display them on the page. The processing time increased enormously since there were a lot many records to retrieve and hence, the page loaded real slow :(. And while the user kept waiting for the page to show up, there was really no intimation to the user that the page processing is going on and the page would finally appear :) I found a very simple solution to this problem through Meta tag usage on the page. Below is a quick sample showing a custom message on the web page while some processing happens at the server side. Though there were other approaches also for this problem, I found this the simplest and easiest to implement. Follow the below mentioned steps to use the Meta refresh tag. 1. Add the Meta refresh Tag ...

Customizing Workplace

We might be faced with a customer requirement, where it is required that we customize workplace to show say, Type as "Phone Call" instead of "All" and Due as "Today" instead of "All". This customization is possible, although it is unsupported by Microsoft. The activities page displayed as default view in Workplace can be found at: <install dir>\CRMWeb\Workplace\ Modifying the code as follows does the trick: function window.onload() { // ---------- Add the following code to the OOTB method ---------- // Eg. Set Due = Today as default crmDateSelector.selectedIndex = 1; // Eg. Type = Phone Call as default crmTypeSelector.selectedIndex = 3; // --------------------------------------------------------------- } Please note that above code is unsupported.

Tool to enhance Developer Productivity - XRMLinq

It is designed to increase Developer productivity by reducing the amount of time and effort needed to effectively use Dynamics CRM. Instead of learning the ins and outs of the complex Software Development Kit (SDK) and the complexities of CRM you can use this library, putting CRM into a context that you are already familiar with. Example: CRM SDK QueryExpression q = new QueryExpression(); q.EntityName = "account"; q.ColumnSet = new AllColumns(); q.Criteria = new FilterExpression(); q.Criteria.FilterOperator = LogicalOperator.And; q.Criteria.AddCondition("name", ConditionOperator.Like, "A%"); q.AddOrder("name", OrderType.Ascending); BusinessEntityCollection r = sdk.RetrieveMultiple(q); foreach (account account in r.BusinessEntities) { Console.WriteLine(account.name); } XrmLinq CrmDataContext context = new CrmDataContext(sdk); var accounts = (from a in context.Accounts where a.Name.StartsWith("A") orderby a.Name select a).ToList(); foreac...

Customization Best Practices

Just came across this list of custmization best practices to follow in the CRM SDK 4.0.10. Using Custom Entities and Attributes ISV solutions can save data by using: • Custom attributes on existing entities • Custom entities • A separate database • Use entity rename to make system entities more meaningful You should use a unique prefix for custom entities and attributes. For example, use an abbreviation of your company name to avoid conflicts with other ISV add-ins. Using Isv.Config.xml Microsoft Dynamics CRM ships with a sample configuration file in the wwwroot_Resources folder. To prepare for installation of ISV add-ins you should rename this file and then create your own configuration file. By doing this you will not confuse the sample UI changes with the UI changes you need for your customization. ISVs should merge changes into the existing ISV.Config file and not overlay the existing configuration file. When Do I Add vs. When Do I Customize an Entity? You should customize a system...

The key specified to compute a hash value is expired, only active keys are valid.

Ever accessed Microsoft Dynamics CRM and got the error “The key specified to compute a hash value is expired, only active keys are valid.” The error logged in the trace is as follows: MSCRM Error Report: -------------------------------------------------------------------------------------------------------- Error: Exception of type 'System.Web.HttpUnhandledException' was thrown. Error Number: 0x8004A106 Error Message: The key specified to compute a hash value is expired, only active keys are valid. Expired Key : CrmKey(Id:d0879dd3-7f9d-de11-a5c4-0003ff392bd3, ScaleGroupId:00000000-0000-0000-0000-000000000000, KeyType:CrmWRPCTokenKey, Expired:True, ValidOn:09/09/2009 20:32:01, ExpiresOn:10/12/2009 20:31:55, CreatedOn:09/09/2009 20:32:01, CreatedBy:NT AUTHORITY\NETWORK SERVICE. Error Details: The key specified to compute a hash value is expired, only active keys are valid. Expired Key : CrmKey(Id:d0879dd3-7f9d-de11-a5c4-0003ff392bd3, ScaleGroupId:00000000-0000-0000-0000-000000000...

Unable to publish workflows

After installing Rollup 7 on my MS CRM server, I could not publish any of the workflows. The error in the trace files read “Type System.Globalization.CultureInfo is not marked as authorized in the application configuration file.” Add the following entries to Microsoft Dynamics CRM web config did the trick to make it work&#61514; <authorizedType Assembly="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Namespace="System" TypeName="Void" Authorized="True"/> <authorizedType Assembly="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Namespace="System.Reflection" TypeName="AssemblyFileVersionAttribute" Authorized="True"/> <authorizedType Assembly="mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Namespace="System.Reflection" TypeName="AssemblyVersionAttribute" Authorized="Tru...

Field-Level Security in Microsoft Dynamics CRM

Recently I came across the blog article Field-Level Security in Microsoft Dynamics CRM : Options and Constraints (at http://blogs.msdn.com/crm/archive/2009/11/16/field-level-security-in-microsoft-dynamics-crm-options-and-constraints.aspx ) which talks about restricting attribute level access to certain users based on the different access channels for users to Microsoft Dynamics CRM. On the client side, one of these ways can be used – a. Passing an indicator to the field to display to the user that they user cannot view the attribute e.g. ‘******’, ‘Restricted’, ‘Not Authorized’. b. Making fields read only or hidden if a user is not authorized to view them. Server Side Restriction –Two strategies are basically proposed: 1. Role based filtering - If the user does not have a role that is entitled to access the attribute then it will be restricted. An advantage of role based filtering (and a reason for its simplicity) is that the access to an entity’s attributes can be defined without need...