Tuesday, June 14, 2011

Control the height of header of the Form in ms crm 2011

there is a big thing in ms crm 2011, that the header is getting bigger(may be rows 6), if am putting any iframe into it, even if i have tried to squize the height of the iframe and also the source page for it.

So what i did is just write a line of JS code onload of the form.
Just try to get the id of the image on top of the form for that entity
and put the following code.
I did it for Contact.
document.getElementById('ico_fhe_2').parentNode.style.height = "70px";
Just you need to change the Id as per the image present in the Entity form corner.
This you can get easily by using the IE developer tool.

There is another found, if the entity is custom and u are changing the image, then there may be chances of missing the id,
in that case if you are using the IFRAME then take the id of IFRAME and use the below code
document.getElementById('IFRAME_name').style.height = "80px";
Hope it helps.

No comments:

Post a Comment