<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>crm.atechnisch.nl &#187; iFrame</title>
	<atom:link href="http://crm.atechnisch.nl/tag/iframe/feed/" rel="self" type="application/rss+xml" />
	<link>http://crm.atechnisch.nl</link>
	<description>How to improve Microsoft Dynamics CRM</description>
	<lastBuildDate>Wed, 25 Nov 2009 08:12:40 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Change NavBar into iFrame</title>
		<link>http://crm.atechnisch.nl/2008/10/change-navbar-into-iframe/</link>
		<comments>http://crm.atechnisch.nl/2008/10/change-navbar-into-iframe/#comments</comments>
		<pubDate>Fri, 10 Oct 2008 12:47:05 +0000</pubDate>
		<dc:creator>Huib Aarts</dc:creator>
				<category><![CDATA[Client Side Scripting]]></category>
		<category><![CDATA[MS CRM 4.0 Customizations]]></category>
		<category><![CDATA[iFrame]]></category>
		<category><![CDATA[innerHTML]]></category>
		<category><![CDATA[NavBar]]></category>

		<guid isPermaLink="false">http://crm.atechnisch.nl/2008/10/10/change-navbar-into-iframe/</guid>
		<description><![CDATA[I received a question about how to change the left NavBar into an iFrame.
After some experimentation, I have a solution:

if (document.all.tdAreas != null) {
document.all.tdAreas.parentElement.children[0].innerHTML = &#34;&#60;iFrame src = 'http://crm.atechnisch.nl' height = '100%'&#62;&#34;;
}

This should also work for other parts of the screen in a similar way.
]]></description>
			<content:encoded><![CDATA[<p>I received a question about how to change the left NavBar into an iFrame.<br />
After some experimentation, I have a solution:</p>
<pre class="brush: css;">
if (document.all.tdAreas != null) {
document.all.tdAreas.parentElement.children[0].innerHTML = &quot;&lt;iFrame src = 'http://crm.atechnisch.nl' height = '100%'&gt;&quot;;
}
</pre>
<p>This should also work for other parts of the screen in a similar way.</p>
]]></content:encoded>
			<wfw:commentRss>http://crm.atechnisch.nl/2008/10/change-navbar-into-iframe/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Related Entity in iFrame</title>
		<link>http://crm.atechnisch.nl/2008/01/related-entity-in-iframe/</link>
		<comments>http://crm.atechnisch.nl/2008/01/related-entity-in-iframe/#comments</comments>
		<pubDate>Wed, 16 Jan 2008 10:36:01 +0000</pubDate>
		<dc:creator>Huib Aarts</dc:creator>
				<category><![CDATA[Client Side Scripting]]></category>
		<category><![CDATA[MS CRM 4.0 Customizations]]></category>
		<category><![CDATA[iFrame]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[related entity]]></category>

		<guid isPermaLink="false">http://crm.atechnisch.nl/2008/01/16/related-entity-in-iframe/</guid>
		<description><![CDATA[Related entities are not displayed directly on the form, but only via the navigation pane.
For the user this means an extra click, and more important, when they look at the form, they are not sure if a related record is present. One way to solve this is to show the associated view of the related [...]]]></description>
			<content:encoded><![CDATA[<p align="left">Related entities are not displayed directly on the form, but only via the navigation pane.<br />
For the user this means an extra click, and more important, when they look at the form, they are not sure if a related record is present. One way to solve this is to show the associated view of the related entity in an iFrame on the form. Related entities are not available as long as the entity has not been saved. Before the entity is saved the entity can not be shown in the iFrame.<br />
For this the script has to check if the related entity is available. This can be done by checking if the form has been saved. When the associated view of the related entity normally is shown in an iFrame the borders are the same as the borders of the normal associated view. This will cost you a lot of precious screen space. Via additional javascript lines the borders can be hidden.<br />
In MS CRM 4.0 you can have multiple organization on one server, this means we have to put the organization name in the link of the iFrame.<br />
The javascript code has to be placed in the onload of the entity</p>
<pre class="brush: css;">
//first check if the user is online. If the user is online, than the organization name should be used in the link. Otherwise (if offline) the organisation name should not be used in the link.
if (IsOnline())
{
var org = &quot;/&quot; + ORG_UNIQUE_NAME;
}
else
{
var org = &quot;&quot;;
}

//the first part is to hide the borders
var frameName = 'IFRAME_Name';
var objFrame = document.getElementById(frameName);
var objWindow = document.frames[frameName];
objFrame.allowTransparency=true;
objFrame.onreadystatechange = function () {
if (objWindow.document.readyState=='complete') {
objWindow.document.body.style.backgroundColor='transparent';
if (objWindow.document.getElementsByTagName('BODY')[0]!=null) {
objWindow.document.getElementsByTagName('BODY')[0].style.padding='0px';
}
if (objWindow.document.getElementsByTagName('TABLE')[0]!=null) {
objWindow.document.getElementsByTagName('TABLE')[0].cellPadding='0';
objWindow.document.getElementsByTagName('TABLE')[0].style.border='0px';
}
}
}

//setting the contents of the iframe
var navFrame2;
navFrame2 =
document.all.nav_new_new_entity_new_relatedentity;
var navWindow = document.frames['IFRAME_Name_d'];

//and checking if the entity has been saved, nor quick create, nor bulk edit
if (crmForm.FormType==1 || crmForm.FormType==5 || crmForm.FormType==6)
{
document.all.IFRAME_Name.src=&quot;about:blank&quot;;
}
else
{
if (navFrame2 != null)
{
document.all.IFRAME_Name.src= org + &quot;/userdefined/areas.aspx?oId=&quot; +
crmForm.ObjectId +&quot;&amp;amp;oType=&quot;+crmForm.ObjectTypeCode+&quot;&amp;amp;security=852023&amp;amp;tabSet=new_new_entity_new_relatedentity&quot;;
navFrame2.name = navFrame2.id;
}
else{
alert(&quot;Page Not Found&quot;);
}
}
</pre>
<p align="left"><strong>//PS Make sure the Security Setting &#8220;Restrict cross-frame scripting&#8221; is <span style="color: #ff0000;">NOT</span> enabled on the iFrame Properties form (the checkbox should be empty)  <br />
//AND you have to change the userdefined for system entities, but who is using does&#8230;</strong> (in the link of the parent entity you can find the solution e.g. something like &#8216;document.all.IFRAME_Name.src= org + &#8220;/sfa/opps/ &#8216; etc).</p>
]]></content:encoded>
			<wfw:commentRss>http://crm.atechnisch.nl/2008/01/related-entity-in-iframe/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
