web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / Nishant Rana’s Weblog / Email Description Field / B...

Email Description Field / Body field and JavaScript in CRM

Nishant Rana Profile Picture Nishant Rana 11,325 Microsoft Employee

Hi,

To set description field in email with formatting instead of DataValue we need to use

document.all[‘descriptionIFrame’].contentWindow.document.body.innerHTML="One <br/> Two";

as it is rendered as IFrame.

And in form’s onload to set it we need to use script like this

document.all[‘descriptionIFrame’].attachEvent( "onreadystatechange", stateChanged)
return;
function stateChanged()
{
     if (document.all[‘descriptionIFrame’].readyState==4 ||document.all[‘descriptionIFrame’].readyState=="complete")
          {
     document.all[‘descriptionIFrame’].contentWindow.document.body.innerHTML='<span style="color: #6600cc">this </span>is a <span style="font-weight: bold; font-style: italic">test</span>’;
     }
}

Check the entire thread here !!

http://social.microsoft.com/Forums/en-US/crmdevelopment/thread/e349b7fc-f42a-4fa5-aaa4-ba01673a73ed

 

Bye..


Posted in CRM, Microsoft Dynamics CRM Tagged: CRM, CRM 4.0

This was originally posted here.

Comments

*This post is locked for comments