Показать сообщение отдельно
Старый 27.06.2012, 12:56   #1  
lexus777 is offline
lexus777
Участник
 
2 / 10 (1) +
Регистрация: 27.06.2012
Фильтрация без повторов
Добрый день!
При создании фильтрации в CRM 2011 столкнулся со следующей проблемой:

Если при создании customView в запросе (fetchXml) значение параметра «distinct» равно «true», то фильтрация работает корректно, но выбрать объект не получается т.к. все кнопки неактивны.
А если «distinct» равно «false», то кнопки активны, но появляются повторы при фильтрации.

Делаются следующие шаги:
1) Создается fetchXml:

<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='true'>"
<entity name='new_region'>
<attribute name='new_nameofregion'/>
<attribute name='new_regionid'/>
<link-entity name='new_area' from='new_regionid' to='new_regionid' link-type='inner'>
<link-entity name='new_se_area' from='new_area' to='new_areaid' link-type='inner'>
<filter type='and'>
<condition attribute='new_se' operator='eq-userid'/>
</filter>
</link-entity>
</link-entity>
</entity>
</fetch>

2) Создается layoutXml:

<grid name='resultset' object='1' jump='new_regionid' select='1' icon='1' preview='1'>
<row name='result' id='new_regionid' >
<cell name='new_nameofregion' width='300' />
<cell name='createdon' width='100' />
</row>
</grid>


3) Вызывается lookupControl.addCustomView(…);

В чем может быть проблема?