Friday, June 13, 2008

Dynamically changing the name of a tab

This comes from one of my coworkers, great hack. This works not only in the onLoad but also on the onChange of any field on the form. This is a great, simple script that might help users out a bit more.

var title = crmForm.all.primarycontactid.DataValue;

if(title != null)
document.all.tab4Tab.innerText = title[0].name;

You will need to change your tab4Tab to whatever tab you have on the form (remember, tabs start at 0 for the first position so make sure you get your numbering correct).

Simple as that. Now your tab will show the text of the name of the Primary Contact. Oh, one stipulation, the size of the tab will not regrow using this code, only the text. So, if your tab is named "Test" and I were to replace it with "David Fronk" then my name would get "wordwrapped" and it could look pretty funny. So, make your initial name something longer. If I come across how to dynamically grow the tab so as to fit the name being placed in it I'll definitely post that up here as well.


David Fronk
Dynamic Methods Inc.

Friday, June 06, 2008

Unable to send email template to all contacts

We recently found that attempts to email a list of users or contacts (pretty much any list) using an email template did not work. When attempting to send an email to a list we would get the following error:

"The requested record was not found or you do not have sufficient permissions to view it."

We brought this up with Microsoft and it ended up in being a bug and Microsoft has just released a bug fix for this issue. You must submit a ticket with Microsoft for the hotfix but there will be no charge for the ticket. The KB article is 951477.

The list of bug fixes is growing and I think that's a big help to CRM 4.0.

Hopefully this helps someone else out there.

David Fronk
Dynamic Methods Inc.