Making ASP.NET pages look like MSCRM
Microsoft CRM supports many customizations, some of them are simple (adding a field) while others (also simple to do) actually allow you to embed other web pages view IFrames or add new buttons to the tool bar or the links on the left hand side of the window. This is great as part of the ability to link pages in is that CRM automatically passes various parameters to the web page that is being referenced, including the Guid and type of object. This means if you build a web page your web page gets context information for free (no weird JavaScript to navigate to it).
The problem seen at many customers is that these pages look nothing like CRM. This would make sense if you are embedding something like Live Maps, but if you are building the pages yourself why not make them look like CRM. This improves the user experience significantly and really isn't hard to do. In fact Microsoft has shipped a sample in the SDK for you. The problem is this is a HTML page and when converting to ASP.NET you will hit a few problems. However it is a simple 9 quick steps to get it right. So let's get into how to make your ASP.NET page look like Microsoft CRM.
- Once you have loaded your project (I am assuming you are using a new asp.net page which has had nothing done to it), navigate to where you have extracted the CRM SDK, and under it you will find a style sheet you will need. It can be found in: CRM SDK\sdk samples\stylesheet\template.css. Add this to your project.
- Next drag the CSS file from the solution explorer onto the default.aspx (I am assuming that Visual Studio is in design view and not source view). If you get this right the background will go that lovely light blue.
- Next open the sample html page (CRM SDK\sdk samples\stylesheet\sample.htm) in your favorite text editor and copy the content from opening body tag to closing body tag. Now switch VS to source mode and replace the asp.net pages content from opening body tag to closing body tag with the copied source.
- When you try to switch back to design view you will get 11 errors. Thankfully it is easy to fix those. li>
- The first fix is to add the runat attribute to the form tab and move it up two lines so it appears above the table tag. So it looks like the image here.
- Next move line 245 to after the closing table tab on the following line so it looks like the image here.
- Now remove line 15 (should just have </td> in it).
- You should be able to get back to design view! But you will be greeted by something not very CRM like still
- Lastly switch back to source and go to line 3 (should start with: <!DOCTYPE) and remove it. This line controls if Internet Explorer works in standards compliant mode or quirks mode, which is a non-standard rendering method. As CRM works solely on IE on Windows, there was no need for compliancy and thus the designers didn't include this and used non-compliant tricks to improve the UI, like tables expanding to but not exceeding 100% of screen height and the gradient effects. <
Undocumented MSCRM 4.0 Requirement
I suspect you can work around this by creating an unattended installation (see the implementation guide for creating the XML files for that), but I'm actually lucky enough to have an empty second drive I can change the drive letter to C (using disk manager).
Add to this that nothing actually appears on C: once I fixed the issue (assuming it is checking for something, and that is failing and thus the issue). So all that I have left to do is:
AARRRRRGGGHHHHHHH
MSCRM 4.0 IFD Manager - Stupid Tip
It clearly states that it should be extracted to a specific folder, namely drive:\Program Files\Microsoft Dynamics CRM\Tools (see point 2). Once in there is works like a dream.
Workflow doesn't work, Imports never happen, emails don't flow and Outlook clients cannot connect - Reloaded
In my previous post on Workflow doesn't work, Imports never happen, emails don't flow and Outlook clients cannot connect I went through the fix by changing SQL. I never liked that fix because it breaks rule one of MSCRM, never edit the database directly. It also has the high chance of screwing up your deployment (quote in the wrong place, or highlight skills lacking in SQL), so I finally found an offically supported tool which does the exact same thing: The IFD tool
What is great about the release version of the tool is it allows you to change those settings in a On Premise scenario only (the bottom set of items), so you don't need to suddenly switch to IFD with the tool to fix the issue. So definitely if you are having a problem, rather use the tool than the SQL statement.Request IP Address has different address family from network address.
Well what is happening is that MSCRM 4.0 doesn't work with IPv6 (as pointed out at http://support.microsoft.com/kb/950100), but what is happening is that the names are resolving internally to IPv6 addresses. The easy way to test is ping the server name and localhost for instance, if you get an IPv6 ip address then welcome to the black parade.
The fix for this is simple, open your hosts files (<system drive>:\windows\system32\drivers\etc\hosts) and add a line for your server name there with an IPv4 address. Save and ping again to make sure it is working. Once it is, do an IISReset and it will be working!
IFD Tool Now Out
Tech•Ed 2006 Presentation and Samples
(This is a repost of the content which was previously available on the IW community site)
At Tech·Ed Africa 2006, myself and Bruce Nicholson did a presentation on integration with Microsoft Dynamics CRM 3.0. While the slides were available for print, and on the event DVD, the code samples were not. No idea why since they were all submitted at the same time but that's life. So now for the first time here are the slides and all the code samples available for download!!
Duplicate Assigns On Create
Here is an interesting effect which I was solved recently, namely when an item in MSCRM was created the assign event (both callout and workflow) would fire twice. This was very odd and great lengths were taken to track it down, using the MSCRM trace tool, various tests etc… But since this was one instance of the problem which could not be replicated at other sites it was eventually shelved until more important issues were resolved.
This issue only occurred during creations from outside sources (namely my code) and didn't happen if you created the item in the MSCRM interface. But this was normal code where I created the item, set the properties and passed it to the Create method. Nothing fancy here. The issue was that I couldn't see the trees because of the forest, namely I was setting the ownerid parameter as one of the parameters.
What this was doing internally was causing the assign to fire when the item was created and then to cause a second assign to fire to handle the ownerid. Removing that one line of code fixed the issue up immediately.
The text entered exceeds the maximum length
The text entered exceeds the maximum lengthThis is caused because the message ID is too long for the field, has nothing to do with the email itself (message is confusing cause it says text entered, but you not actually entering it). To solve it do the following:
-
Open the IE CRM Client.
-
Open Settings
-
Select Customisation from the left menu and open the E-Mail entity.
-
Open Attributes and Open the messageid attribute
-
You should see a text box named Maximum Length with the value 100 in it. Increase this value to 200.
-
Click Save and Close
-
Click Save and Close
-
Click More Actions à Publish All Customisations
-
Click Start Menu à Run and type iisreset click Run
Internet Facing Deployment Tool
UPDATE 11 Feb 2008: The offical tool is now out. See http://www.sadev.co.za/node/167. The download for the beta one has been removed.
If you go through the documentation for MSCRM 4.0 there is a tool which can do the configuration of for you. However this tool does not exist yet and to get it you need to speak to Microsoft Product Support Services as it is still beta. However from looking at the news groups it seems thats hit and miss (guessing that some of the support guys know about it and some don't as it is beta). So until it is available I am putting it up here.
NOTE: This is a BETA tool and neither Microsoft nor myself will give you any help on this. This tool could completely damage your system so if you don't trust it, then do the steps described in the documentation.