Dynamics CRM 2013/2015 owner field in header – full width

Dynamics CRM 2015 is very nice. Especially header fields. Except one small bug – you can’t see owner because field is too short:


Using F12 Developer tools we can see DOM:


Oops this is not in CSS (even worst this is in Dynamics JavaScript)! So the only way to fix this is by unsupported jQuery DOM manipulation. My first try was with JavaScript fired at on form load:

function OnLoad() {
   $(document).ready(function () {
       if ($(".ms-crm-HeaderTileElement.ms-crm-HeaderTileElementPosition1").length)

Works!! …. until save. This is because after saving CRM refreshes some elements but doesn’t fire on my OnLoad function.
You can find interesting way to refresh whole page after save:

I found another way – by “enable rule” on ribbon. We need solution with this entity and then just use “Ribbon Workbench” to modify ribbon:

We also need simple JavaScript almost the same as we have in Onload. Field width is changed also on windows resize – so with a little help from jQuery we can use this function:

function TrickForOwner() {
   $(document).ready(function () {
       if ($(".ms-crm-HeaderTileElement.ms-crm-HeaderTileElementPosition1").length)
   $(window).resize(function () {
       if ($(".ms-crm-HeaderTileElement.ms-crm-HeaderTileElementPosition1").length)
   return true; //because this is trick only

Now we can use Ribbon Workbench to add this rule to default button (for example “New”). Be careful because Dynamics is clever and your rule will be fired only if this button is visible:


I found this helpful tutorial how to play with Ribbon Workbench:

Because ribbon is loaded at the beginning and because form is in iframe we have to use both “on load” and “ribbon rule” JavaScript. I was trying attach event from ribbon to iframe but without success (if you have any idea how to do it with single JS please let me know). I can probably use also this interesting plugin:
To attach event only to owner field.

Finally here we have owner with full name:


Notice that this is unsupported and be careful because probably Microsoft will fix this in near future.


2 thoughts on “Dynamics CRM 2013/2015 owner field in header – full width

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s