AXForum  
Вернуться   AXForum > Microsoft Dynamics CRM > Dynamics CRM: Blogs
CRM
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 10.12.2018, 17:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
crmtipoftheday: Tip #1207: Check applied entity permissions in portals
Источник: https://crmtipoftheday.com/1207/chec...ns-in-portals/
==============

Liquid is a great templating language adding flexibility to your Dynamics 365 Portal templates. However, as any abstraction, it hides some of the things happening under the hood, including some security filtering. Consider this fragment running on authenticated page:

{% fetchxml my_contacts %} {% endfetchxml %}Record count: {{ my_contacts.results.total_record_count }}

And… the count is 2 while expected to be the total number of contacts in this sample environment (around 20 or so) . Er?

This is because the portal engine applies entity permissions to all constructs retrieving the data including fetchxml. To see where did the things go wrong (or right – depending whether it’s your point of view or of your system administrator), use xml property of the fetchxml object. That will tell you what’s actually being executed.

{{ my_contacts.xml | escape }}
In my case resulting fetchxml looks like this

highlighted lines (injected by the portal engine) explain why I’m seeing only two records (my portal is based on Customer Service):
  • deadbeef-38c9-e711-a844-000d3ad1181d is my contact id (after I logged in)
  • condition on contactid is a result of the “self” OOB Customer Service – Contact of the User entity permission that gives portal users permissions to access their own profile
  • condition on parentcustomerid is a result of the OOB Customer Service – Contact of the Contact entity permission giving portal users access to the contacts where they are the parent customer

Источник: https://crmtipoftheday.com/1207/chec...ns-in-portals/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
crmtipoftheday: Tip #1044: Display lookups as hyperlinks in portal entity list Blog bot Dynamics CRM: Blogs 0 15.12.2017 03:21
crmtipoftheday: Tip #1024: Make an entity regarding available from Outlook App Blog bot Dynamics CRM: Blogs 0 16.11.2017 20:11
crmtipoftheday: Tip #1023: Go directly to any entity in Dynamics 365 Blog bot Dynamics CRM: Blogs 0 15.11.2017 05:14
crmtipoftheday: Tip #1005: Keep your portals warm and cuddly Blog bot Dynamics CRM: Blogs 0 23.10.2017 19:12
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 00:19.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.