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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 28.02.2024, 04:13   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
crmtipoftheday: Tip #1441: Owner is a user is a team
Источник: https://crmtipoftheday.com/1441/owne...user-is-a-team
==============

WARNING: Niche L400 tip ahead.

tl;dr

If you’re expect primary column name to be tablename + “id“, add an exception for systemuser and team tables – both will come back as ownerid in custom API.

L400

If custom API has an output property of type EntityReference then, for example, for account (or any other “normal”) table, the following json is returned as expected:

"Account": { "@odata.type": "#Microsoft.Dynamics.CRM.account", "accountid": "87aa5cfb-197c-ea11-a813-000d3abeef18" }
Save yourself a trip to metadata and use tablename + “id” for the primary column name, right? Not so fast. For either systemuser or team, you get ownerid instead of expected systemuserid or teamid

"User": {  "@odata.type": "#Microsoft.Dynamics.CRM.systemuser", "ownerid": "889362cfb-22aa-eaea-abba-dead3a6a9942"}
No one knows dev docs better than Jim Daly, his patience to express RTFM sentiment is fascinating.
In Web API ownerid is the primary key for the systemuser EntityType and the team Entitytype because both inherit this property from the principal EntityType, which enables the capability for either types to be owners of records.

— Jim Daly
The ownerid value is the same as the respective systemuserid or teamid columns.



Источник: https://crmtipoftheday.com/1441/owne...user-is-a-team
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
crmtipoftheday: Tip #1435: Update Dataverse user photo from Office 365 profile Blog bot Dynamics CRM: Blogs 0 06.04.2022 19:12
crmtipoftheday: Tip #1424: The user does not have sufficient access right to run flow with custom connector Blog bot Dynamics CRM: Blogs 0 20.01.2022 08:16
crmtipoftheday: Tip #1309: 213 revisited: Embedded user role list Blog bot Dynamics CRM: Blogs 0 07.10.2019 16:47
crmtipoftheday: Tip #1089: User Delete Privileges Stretch Further Than You Think Blog bot Dynamics CRM: Blogs 1 20.03.2018 13:24

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

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

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