<?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>Microsoft Dynamics CRM &#187; crm tree</title>
	<atom:link href="http://ms-dynamics-crm.com.ua/tag/crm-tree/feed/" rel="self" type="application/rss+xml" />
	<link>http://ms-dynamics-crm.com.ua</link>
	<description>Все о Microsoft Dynamics CRM</description>
	<lastBuildDate>Mon, 21 May 2012 14:44:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Решение проблемы нагруженности CRM-формы с помощью сворачивания разделов</title>
		<link>http://ms-dynamics-crm.com.ua/2009/03/31/ms-crm-collapsible-sections/</link>
		<comments>http://ms-dynamics-crm.com.ua/2009/03/31/ms-crm-collapsible-sections/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 06:13:22 +0000</pubDate>
		<dc:creator>Катерина Головчан</dc:creator>
				<category><![CDATA[ms crm 4.0]]></category>
		<category><![CDATA[crm tree]]></category>
		<category><![CDATA[javascript in ms crm]]></category>

		<guid isPermaLink="false">http://ms-dynamics-crm.com.ua/?p=644</guid>
		<description><![CDATA[Наткнулась на интересное решение проблемы с нагруженностью crm-формы. Можно добавить элементы дерева на форму, чтобы скрыть &#171;под катом&#187; некоторые разделы. Код скрипта довольно прост, скрипт выполняется по OnLoad формы.  Приведем пример для Account, скроем на вкладке General первый раздел и раскроем второй раздел, примерно так: Событие OnLoad сущности Account: function OnCrmPageLoad() { /* false &#8212; [...]]]></description>
			<content:encoded><![CDATA[<p>Наткнулась на интересное <strong>решение проблемы с нагруженностью crm-формы</strong>. Можно добавить элементы дерева на форму, чтобы скрыть &#171;под катом&#187; некоторые разделы. Код скрипта довольно прост, скрипт выполняется по <strong>OnLoad </strong>формы.  Приведем пример для Account, скроем на вкладке <strong>General </strong>первый раздел и раскроем второй раздел, примерно так:</p>
<p><img class="aligncenter size-full wp-image-646" title="ms-crm-collapsible-sections-account" src="http://ms-dynamics-crm.com.ua/wp-content/uploads/2009/03/ms-crm-collapsible-sections-account.png" alt="ms-crm-collapsible-sections-account" width="595" height="460" /></p>
<p><span id="more-644"></span>Событие OnLoad сущности Account:</p>
<blockquote><p>function OnCrmPageLoad() {<br />
/* false &#8212; collapsed, true &#8212; expanded */<br />
//First Tab, Second Section, Expanded<br />
ConvertSection(0,1,true);<br />
//First Tab, First Section, Collapsed<br />
ConvertSection(0,0,false);<br />
}</p>
<p>function ConvertSection( tabIndex , sectionIndex , state ) {<br />
var sec = document.getElementById( &#171;tab&#187; + tabIndex );<br />
var td = sec.childNodes[0].rows[ sectionIndex ].cells[0].childNodes[0].rows[0].cells[0];<br />
var secHTML = td.innerHTML;<br />
state = (typeof(state) == &#171;undefined&#187;)? false:!state;<br />
var src = (state == false)? &#171;/_imgs/tree/dashPlus.gif&#187;:&#187;/_imgs/tree/dashMinus.gif&#187;;<br />
td.innerHTML = &#171;&lt;NOBR style=&#8217;VERTICAL-ALIGN: middle;cursor:hand&#8217; onclick=&#8217;excoSection(this)&#8217;&gt;&lt;IMG src=&#8217;&#187; + src + &#171;&#8216; align=&#8217;middle&#8217; /&gt; &#187; + td.innerHTML + &#171;&lt;/NOBR&gt;&#187;;<br />
td.childNodes[0].childNodes[0].state = state;<br />
excoSection(td.childNodes[0]);<br />
}</p>
<p>/* Toggle SectionState */<br />
function excoSection( sec ) {<br />
sec = sec.childNodes[0];<br />
sec.state = !sec.state;<br />
sec.src = (sec.state)? &#171;/_imgs/tree/dashMinus.gif&#187;:&#187;/_imgs/tree/dashPlus.gif&#187;;<br />
var display = (sec.state)? &#171;inline&#187; :&#187;none&#187;;<br />
var tblsec = sec.parentElement.parentElement.parentElement.parentElement;<br />
for( var i =1 ; i &lt; tblsec.rows.length ; i++ )<br />
tblsec.rows[i].style.display = display;<br />
}<br />
//Expose the toggling function at the window level<br />
this.excoSection = excoSection;</p>
<p>OnCrmPageLoad();</p>
</blockquote>
<p>Это весьма гибкое и интересное решение взято отсюда <a href="http://mscrm4ever.blogspot.com/2008/08/creating-collapsable-sections.html">Creating Collapsible Sections</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://ms-dynamics-crm.com.ua/2009/03/31/ms-crm-collapsible-sections/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

