A collection of tips and findings from a UK based Dynamics CRM Consultant
Monday, 17 November 2008
SQL Date Formats
Very useful when producing SSRS reports..
http://www.sql-server-helper.com/tips/date-formats.aspx
Thursday, 13 November 2008
Plugin Registration Tool
if you need to run the plugin registration tool included with the CRM 4.0 SDK using default credientials, leave the Domain Name blank and you'll log straight in.
Useful if you get an unauthorised 401 errors trying to connect.
Tuesday, 4 November 2008
Adding a Custom Notification to the top of a Microsoft CRM Form
So to kick things off, here is some javascript I wrote for a customer to add a custom notification to the CRM form, this provides a CRM stylised banner to the top of the form, much like those on products and service activities. Add this javascript to your form onLoad() event and add any conditions as necessary.
Hope it helps!
var warningHtml =
"<table callpadding='0' cellspacing='0'><tr valign='middle'><td><img src=''../_imgs/ico/16_alert.gif'' /></td><td><b>Warning Message</b></td><tr></table>'";
var oDiv = document.createElement("div");
oDiv.id = "new_warning";
oDiv.className = "Notifications";
oDiv.style.padding = "3px";
document.crmForm.all.Notifications.parentNode.appendChild(oDiv);
var theDiv = document.crmForm.all.new_warning;
theDiv.style.display = "";
theDiv.innerHTML = warningHtml;
P.S. This is an unsupported development, usual caveats apply.
Wednesday, 20 February 2008
Advanced Find in CRM 4.0 - Same entity relationships not allowed?
Basically the model is..
- a contact has a group of interests
- these interests exist in a seperate entity
- the contact is connected to an interest through a link entity (contact-interest). (basically making a many to many)
The user can then use an advanced find to search for all contacts with a certain set of interests. For example:
- Contact 1 has interest A and interest B
- Contact 2 has interest A
The user wants to find contacts with interest A and interest B
An advanced find with contacts with contact-interests where interest equals and selecting A and B in the lookup serves as an OR and finds both contacts.
An AF where interest equals A and a seperate line for interest equals B finds neither (the interest lookup on contact interest can not be both).
So, the only way to get this to work is to have two contact-interest lines....
Find Contacts
Contact Interest (Contact)
Interest = A
Contact Interest (Contact)
Interest = B
This works in CRM 3.0 as it will find contact 1 who has both.
Problem is, CRM 4.0 doesn't allow you to create duplicate clauses to the same entity as above and comes up with the following error:
"The relationship you are adding already exists in the query"
Does anyone know of a way round this? It looks like the CRM team have chosen to block this and I'm not sure why!