Neil McDonald's Dynamics 365 Blog

Archive for Jul 2010

IE8 crashing when using picklists in Advanced Finds

leave a comment »

I’ve been having an issue where IE8 would crash when trying to use picklists in advanced finds (see below example).

It may not be a common issue, but I posted it on the MS partner forums and got the below response which has fixed it for me, so hopefully it will help someone else out too!

Edit AdvFind.aspx and add the following code. AdvFind.aspx can be found in the CRM web directoryAdvancedFind

NOTE: The code needs to be added right below function window.onload(){

<% if (Request.Params["AutoRun"] != "False")
{
%>
if (location.href.indexOf("?") > 0)
location.href = location.href + "&AutoRun=False";
else
location.href = location.href + "?AutoRun=False";
<%
}
%>

Written by neilmcd

Jul 14, 2010 at 10:05 am

CRM pop-ups in new tabs

with one comment

2crms

With Internet Explorer, you have the option to open all pop ups in a new tab rather than a new window. I find this works great for CRM, particularly when working inside different organisations. I can keep my development organisation and all pop ups in one IE instance and my live instance in another. You can find the option to do this under IEToolsInternet Options and click the Settings button under the Tabs section on the General tab.

Tabbed

Written by neilmcd

Jul 12, 2010 at 1:15 pm

Posted in CRM 4, Misc

Tagged with ,

CRM iPhone homescreen icon

leave a comment »

I sometimes like to check up on cases and activities from my iPhone and have a homescreen shortcut to our CRM mobile express site. By default, Dynamics CRM does not have an iPhone icon, so I created one for myself here. If you’d like to use it, download it, save it as apple-touch-icon.png and drop it into your CRM web root folder (mine is c:inetpubwwwroot). When you next navigate to your CRM mobile express site, add it to your homecreen and it will display a much prettier icon.

photo.PNG.scaled500/

Written by neilmcd

Jul 9, 2010 at 12:00 pm

Posted in CRM 4, Misc

Tagged with ,

View originating lead notes on a contact

leave a comment »

Our sales guys wanted a way to view originating lead notes against the Contacts created from Leads. I added a new tab to the contact containing an Iframe and used the below javascript to display the notes from the originating lead.


var lookupItem = new Array;
//set the lookup to the originating lead
lookupItem = crmForm.originatingleadid.DataValue;

if (lookupItem != null)
{
//display the originating lead notes in the iframe 'IFRAME_LeadNotes'
crmForm.all.IFRAME_LeadNotes.src="/_controls/notes/notesdata.aspx?id="+  lookupItem[0].id +  "&ParentEntity=3&EnableInlineEdit=false&EnableInsert=false";
}
else
{
//if there is no originating lead, hide the tab
crmForm.all.IFRAME_LeadNotes.src="about:blank";
tab7Tab.style.display = "none";
}

Written by neilmcd

Jul 9, 2010 at 10:38 am

Posted in CRM 4

Tagged with , , ,

Hide tabs and disable fields based on user roles

leave a comment »

The below is a way to hide a tab to everyone not in the Account Manager and System Administrator roles. There’s also a slightly less polished method to disable fields to everyone not in the System Administrator role.

You should be able to copy and paste the below script into your OnLoad event and change the bottom 2 lines of code to specify the tab you want to hide. It wil then hide it from everyone not in the roles specified. You’ll also have to change the attribute names which you want to disable in the HideField function.

Read the rest of this entry »

Written by neilmcd

Jul 8, 2010 at 6:58 pm

Posted in CRM 4

Tagged with , ,

Changing an Active Directory username in CRM

leave a comment »

Add_user_error

One of our users had complained that their name was spelled incorrectly. I made the changes in AD, Exchange and in her CRM user account, but when I tried to change her domain login name in CRM, I received the error ‘You are attempting to create a user with a domain logon that is already used by another user…’

To get around it, I made the change directly in the organisation database. The domain login name is stored in the ‘DomainName’ column of the ‘SystemUserBase’ table, so I just edited the data within SQL management studio.

FYI – Although I do this, I don’t recommend making any changes to the CRM databases directly. A safer workaround is posted here

Written by neilmcd

Jul 7, 2010 at 6:06 pm

Posted in CRM 4

Tagged with ,

Google Maps in CRM

leave a comment »

Tumblr_l56ytphlmo1qccrkio1_1280

I wanted a quick way of viewing an Account’s location so I created a link to Google maps based on the postcode of the Account.

First of all, create an nvarchar/URL attribute called new_googlemaps, stick it somewhere on your Account form and then put the below javascript into the Account OnLoad event


crmForm.all.new_googlemaps.DataValue = “http://maps.google.com/maps?q=”+crmForm.all.address1_postalcode.DataValue;

It’s pretty basic but does exactly what I want. I’m going to look at embedding the actual map in an iframe when I get the chance

Edit: it turns out that Richard Knudson has covered embedding maps already on his site!

Written by neilmcd

Jul 5, 2010 at 10:27 pm

Posted in CRM 4

Tagged with ,