<?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>Wed, 25 Jan 2012 21:20:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.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 &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>Наткнулась на интересное <strong>решение проблемы с нагруженностью crm-формы</strong>. Можно добавить элементы дерева на форму, чтобы скрыть &laquo;под катом&raquo; некоторые разделы. Код скрипта довольно прост, скрипт выполняется по <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 &#8211; collapsed, true &#8211; 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( &laquo;tab&raquo; + 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) == &laquo;undefined&raquo;)? false:!state;<br />
var src = (state == false)? &laquo;/_imgs/tree/dashPlus.gif&raquo;:&raquo;/_imgs/tree/dashMinus.gif&raquo;;<br />
td.innerHTML = &laquo;&lt;NOBR style=&#8217;VERTICAL-ALIGN: middle;cursor:hand&#8217; onclick=&#8217;excoSection(this)&#8217;&gt;&lt;IMG src=&#8217;&raquo; + src + &laquo;&#8216; align=&#8217;middle&#8217; /&gt; &raquo; + td.innerHTML + &laquo;&lt;/NOBR&gt;&raquo;;<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)? &laquo;/_imgs/tree/dashMinus.gif&raquo;:&raquo;/_imgs/tree/dashPlus.gif&raquo;;<br />
var display = (sec.state)? &laquo;inline&raquo; :&raquo;none&raquo;;<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>

