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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 09.07.2020, 15:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
crmtipoftheday: Tip #1375: Get record count for entities
Источник: https://crmtipoftheday.com/1375/get-...t-for-entities
==============

I need to perform some data… uhm… “augmentation”. Easy as using Power Automate – get all the records, loop through, fudge I mean augment the data. Right? Except there could be more than 100,000 records. Why 100K? That’s the maximum you can get with the List Records action. (Wanted to insert a reference here but that limit does not seem to be documented at all… Oh, well, save it for another tip). In short: I need quickly to find out the total number of records in couple entities. On top of that, those were the entities not exposed outside of their parent entities, like Order Product or Invoice Product.

Even if you are not a developer there are couple Web API methods you can add to your toolbox and RetrieveTotalRecordCount function is one of them.

https://orgname.crmN.dynamics.com/ap...t(EntityNames=['logical_name_1','logical_name_2', ...])

for example:

https://foobar.crm.dynamics.com/api/...t(EntityNames=['salesorder','salesorderdetail','invoice','invoicedetail'])

This is what comes back:

{ "@odata.context": "https://foobar.crm.dynamics.com/api/data/v9.1/$metadata#Microsoft.Dynamics.CRM.RetrieveTotalRecordCountResponse", "EntityRecordCountCollection": { "Count": 4, "IsReadOnly": false, "Keys": [ "salesorder", "salesorderdetail", "invoice", "invoicedetail" ], "Values": [ 6679, 10547, 17568, 59618 ] }}Nice and easy, right?

Cover photo by Amornthep Srina from Pexels.



Источник: https://crmtipoftheday.com/1375/get-...t-for-entities
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
crmtipoftheday: Tip #1372: Synchronous Power Automate Flow on create/update of a record Blog bot Dynamics CRM: Blogs 0 30.06.2020 07:17
crmtipoftheday: Tip #1349: Calculated field from related record Blog bot Dynamics CRM: Blogs 0 04.05.2020 20:21
crmtipoftheday: Tip #1256: Get attribute of the first record from the list Blog bot Dynamics CRM: Blogs 0 24.04.2019 14:11
crmtipoftheday: Tip #1246: Use “Get Record” to get all the fields in Flow Blog bot Dynamics CRM: Blogs 0 02.04.2019 15:11
Опции темы Поиск в этой теме
Поиск в этой теме:

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

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

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

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