03.12.2009, 19:05 | #1 |
Участник
|
CRM Programmer: On form load set some selected value for related entity pick-list
Источник: http://crmpro.blogspot.com/2009/12/o...r-related.html
============== I had to set the value for related entity pick-list — filter of date for Activities of some account, like it was default Selected value. SelectArea('Activities', 'scheduledend'); SelectArea('ActivityHistory', 'actualend'); function SelectArea(loadAreaId, selectId) { var navElement = document.getElementById('nav'+loadAreaId); if (navElement != null) { navElement.onclick = function LoadAreaOverride() { loadArea('area'+loadAreaId); var iframeid = 'area'+loadAreaId + 'Frame'; var Iframe=document.getElementById(iframeid); if (Iframe != null ) { Iframe.onreadystatechange = function SetAllasDefault() { if (Iframe.readyState == 'complete') { var iFrame = frames[window.event.srcElement.id]; var oSelect = iFrame.document.getElementById(selectId); var oOption = oSelect.options[oSelect.options.length-1]; oOption.selected = true; oSelect.FireOnChange(); } } } } } } Put at form OnLoad() event; Источник: http://crmpro.blogspot.com/2009/12/o...r-related.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
04.12.2009, 09:23 | #2 |
Moderator
|
Где-то я это уже видел...
__________________
http://fixrm.wordpress.com, снятие/наведение порчи. Быстро, дорого, гарантия. MS Certified Dirty Magic Professional |
|
|
|