At Last!! Hide Tab (Section) in CRM 2011 with Javascript!!!
Ok, i realise that , for everyone else, this is not an earth shattering piece of JavaScript but this has been bugging me for Aaaaaaaaaaages!!!
I have been looking for the JavaScript to hide Tab (or what is now known as a section) in CRM 2011. Every other blog/SDK/forum post i read suggested the following:
1: Xrm.Page.ui.tabs.get(5).SetVisible(false);
2: Xrm.Page.ui.tabs.get(5).SetVisible(true);
No matter how i tried i could not get this to work. However, after some detective work……and reading this blog post (cheers) i realised that the bit i was missing was that in the script, the brackets need to contain the name of the tab (name, not the Label). However, it has to be contained in “”. So my code was…
1: Xrm.Page.ui.tabs.get("tab_3").SetVisible(false);
2: Xrm.Page.ui.tabs.get("tab_3").SetVisible(true);
Sorted! Hope that helps
Cheers
xRM Consultant
MS Dynamics CRM 2011 Quick Ref. Javascript
Just a quick post today to advertise a very very useful post by fellow CRM Blogger Gareth Tucker..
Brilliant list of Javascript basics in CRM 2011 - JScript in CRM 2011– Quick Reference for the Basics
Enjoy!
xRM Consulatant
CRM 4 Email Router–Service Wont Start!
Howdy,
I had a customer call this week stating that the email marketing solution they had purchased from us (eCampaign, brilliant solution check it out here) was not sending emails.
Upon investigation, we realised that the email had been created but for some reason Microsoft Dynamics Email Router was not sending them. The email router service was stoppped and every time we tried to retstart it would immediately stop again!
After some digging around we found a blog post that gave us the solution.
The Microsoft.Crm.Tools.EmailAgent.SystemState.xml in the C:\Program Files\Microsoft CRM Email\Service folder had become corrupt. We closed down email router, removed the file and restated the service. This worked a treat and all the emails started sending merrily. Only problem……27k emails started sending! But at least the customer was happy to be sending emails again.
Hope this helps
Thanks
xRM Consultant
P.S. Thanks to Marcello for his help!
Email Router Outgoing Email Delays
We have a client who uses workflows to guide their sales and marketing process very heavily and relies on certain emails being automatically sent as notifications from their CRM instance.
When we first set-up their solution we used the Outlook plug-in to send emails but as the minimum polling time for emails using the plug-in is 15 minutes this wasn’t going to work either. So, we set about using the Email Router. It was installed, setup and configured properly but for some reason there was this random delay in sending emails. Sometimes an email would be sent within a minute or 2 and other times it would take over 10 minutes. Sometimes a single email would be delivered and at other times 4 or 5 would come through at the same time?!!
We found out today what the problem was.
The issue lies firmly in the XML configuration file for the email router. The polling time for outgoing mail was set within the Microsoft.CRM.EmailAgent.xml was set to 1000 seconds. This polling was obviously based on the system time. So therefore, if the CRM Email Router polled the CRM at 10:00am and someone sent an email at 10:01 it not be delivered until 10:16ish, therefore the user would be aware of the delay. On the other hand if the user sent the email at 10:15, they would think that the emails were sending immediately “as they should be”. The solution was to change the polling time to 60 seconds (we didn’t want to push it!) and it worked a treat.
To make the change follow these steps:
- Go to your exchange server (the server where the email router is installed)
- Navigate to C:\Program Files\Microsoft CRM Email\Service
- Copy the Microsoft.CRM.EmailAgent.xml file to a safe location as a backup.
- Edit the Microsoft.CRM.EmailAgent.xml within Notepad (I prefer PSPad)
- Find the SchedulingPeriod element
- Change the value to 60 (it should be 1000 currently)
- Save the file.
- Open up the CRM Email Router and publish the changes
- Restart the Microsoft CRM Email Router service
- Your done!
Enjoy!
Cannot See Customization In Settings Area
Sorry its been a while…..
I have had this REALLY annoying issue on my desk machine for a while. Anytime I accessed our internal CRM system, even though I had the System Administrator security role, I could see everything except for the Customizations navigation option. This was very frustrating as I would have to VPN into our CRM server to do any work.
However, after a quick search I found the answer today. It relates to the Site Map and having Outlook open when using CRM via the Web interface.
Apparently, if you have the Customizations navigation option configured to web only, when you run CRM using the outlook interface and the try using the web interface it wont display!!! Weird
Anyway, easy to fix…..
- First I would recommend that you delete your browsing history, stored passwords, cookies etc as this will clear any stored logon information that may be muddying the waters.
- Export your Site Map from your CRM instance. I know this goes without saying but ALWAYS store a backup of your Site Map in case everything goes pear-shaped!
- Find the following entry…
- Change Client=”Web” with Client=”All”
- Save the changes to the Site Map and import into CRM.
Enjoy!
Resize Form & Hide Left Navigation Area of CRM Form
Hi,
As much as I like the look and feel of CRM when you are developing a true xRM solution for a client, as we all know, less can be more.
With this in mind, whilst developing a solution for a client recently, I wanted to hide the entire left-hand navigation menu to give my form a simpler feel to it. So when setting it up I used 2 handy little pieces of JavaScript.
The first resized the window, OnLoad, to the size I wanted for my form:
window.resizeTo(700,520);
This gave me the following OnLoad:
As you can see though, most of the screen is taken up with the Left Navigation are, which for this form I didn't need. So, i hid it using the following code:
document.all.crmNavBar.parentElement.style.display = "none";
document.all.tdAreas.colSpan = 2;
Which game me the following results….
As I said, nice simple JavaScript but I think it makes a huge difference to the appearance of the form and therefore (hopefully) how well the user interacts with it.
Enjoy!
Joel
MS Dynamics Convergence Europe 2010
Hi,
Very pleased to say I have just booked to go to Convergence 2010 Europe.
Got to be honest, never been before but very much looking forward to meeting different people within the Dynamics Community, exchanging ideas etc.
I have been searching for good Dynamics CRM events or even CRM events to keep my knowledge up to date without much joy at the moment. Please feel free to get in touch if you have any recommendations by email (xrmconsultant@gmail.com) or twitter (@xrmconsultant)
Hope to see you there,
Joel
Set CRM Form To Full Screen
Hi,
Quick but useful piece of JavaScript for you. Put this in the OnLoad event of any CRM form and it will maximise the window to fill your current screen size. Handy eh?!
window.moveTo(0,0);
window.resizeTo(screen.availWidth, screen.availHeight);
Enjoy!
Joel
Outlook Sync Issues After Installing CRM Plugin
Howdy,
A customer contacted us today as they were getting a large number of Sync Issues in their outlook Sync Issues folder that relate to CRM. Puzzled and baffled we were…
After a bit of searching we found that this is a known issue that had been fixed as part of recent (10) update roll-ups.
The issue is caused when: (From Microsoft KB Article)
- You share a calendar or a contacts folder in Microsoft Office Outlook with another user.
- You and the user who you shared the calendar or the contact folder with are Microsoft Dynamics CRM 4.0 users.
- Both of you have the CRM Outlook client online or offline.
- The shared calendar or the shared contacts folder contains items that are tracked in Microsoft Dynamics CRM.
This item was not completely updated during the last server synchronization. Click here to review other versions.A
Additionally, the items may become untracked if the following conditions are true:
- The person who you shared the calendar or the contacts folder with does not track items in Outlook to Microsoft Dynamics CRM.
- The user has Write privileges to the shared data in Outlook.
CRM obviously struggles to resolved what it is viewing in outlook against the current active user profile within CRM.
Applying the update roll-up resolves this issue and stops your users Sync Issues box filling up. In addition it reduces the considerable performance overhead that this would cause
Hope this helps
Thanks
Joel
Changing Entity Primary Attribute
Morning,
One thing that always used to wind me right up was the fact that once you hit save to create an entity in MSDYNCRM, you could not change any details about the primary attribute.

However, after a bit of searching i found this blog on the Microsoft Dynamics Community site that was very helpful.
Modifying properties of primary attribute is disabled when you try to do it from “Primary Attribute” tab. However you can change the properties if you opened the attribute from Attributes left navigation instead.
1. Go to Attributes and select “name” i.e. primary attribute of entity. As shown in below screen shot.
2. Open primary attribute i.e. name and change its Requirement Level to “No Constraint” then Save and Close.
3. The changes will also get reflected in Primary Attribute tab. Publish account and test the changes.
Brilliant eh?! Above you have seen how to change the requirement level but this obviously also applies to the display name of the entity. This is particularly handy if you are renaming entities.
Thanks
Joel



