Thursday, May 28, 2009

Stop CRM Form Save

Here I give you an example of what code you might want to consider to achieve the CRM form from saving as you could either use
  • event.returnValue = false; or
  • return false;
To know what's the difference between the two, click on the links below.

Code : alert('You clicked C Drive.'); event.returnValue=false;
Code : event.returnValue=false; alert('You clicked Drive C.');

Observe the above two code and their behavior. When you click on C Drive, you receive an alert box and then the function returns false whereas when you click Drive C the function returns false first but then still goes ahead to and displays the alert.

When you just return false, you will notice a different behavior. Try the below links:

Code : alert('You clicked C Drive.'); return false;
Code : return false; alert('You clicked Drive C.');

This time when you click on C Drive, you receive an alert box and then function returns false whereas when you click Drive C the function returns false and the alert isn't displayed.

I believe with this information you are better equipped on what to use and when.

Wednesday, May 27, 2009

CRM Outlook Client Fails

You may seem all set after installing CRM client for Outlook and configuring it, but all attempts to run Outlook with CRM client fails with :
MS CRM webservice hoster has encountered a problem and needs to close. We are sorry for the inconvenience.

Application Event log entry :
MSCRMAddin event 5911 (info), .NET Runtime 2.0 error reporting event1000, MSCRMAddin event 5909, MSCRMAddin event 16940, MSCRMAddin event 16930, MSCRMAddin event5903.

This is because CRM client for Outlook is not comfortable when you're an Admin User. So let it have it's way and change the users Account Access mode to Full User.

XML Notepad works well

At ease since long, I thought to relieve you from editing XML config files. A great XML editor which just works.

XML Notepad Editor
Try it! Download XML Notepad.

Tuesday, May 12, 2009

Hide / Unhide CRM Form Tabs

Did you know that you could hide and display CRM form tabs. Of course most of you did. Let me give you an example. To hide the second tab on the account form, this is what you should be doing.

crmForm.all.account.tab1Tab.style.display = "none";

My intend is not to convey how to hide a tab [I just did ;)] but also why "tab1Tab"?
I suggest you to have a look at the HTML source on the Account form IE8 > Page > View Source, You'll notice that the tabs have an ID on them (which go tab0Tab, tab1Tab, tab2Tab,........). We just refer them and then use JavaScript's CSS properties to achieve the result.

Caution: Something to keep in mind is if Microsoft decides to change the tab IDs in future releases, you're done! So make sure you have documented these customizations to easily accept future changes.