You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the problem with pac modelbuilder build verb on an environment with a lot of entities - in my case, I'm using Dynamics CRM + Omnichannel + Marketing + Portal. The command used is e.g.
pac modelbuilder build -a -o .-enf "dummy"
the result (please note: 136 messages and only 2 actions written to files):
Connected to... xxxx
Connected as xxxx
Begin Reading Metadata from MetadataProviderService
Begin Reading Metadata from Server
Read 0 Entities
Read 0 Global OptionSets
Read 136 SDK Messages
Completed Reading Metadata from Server - 00:00:34.0372615
Completed Reading Metadata from MetadataProviderService - 00:00:34.0436174
Begin Writing Code File
Processing 0 Entities
Wrote 0 Entities - 00:00:00.0000116
Processing 136 Messages
Wrote 2 Messages - 00:00:00.0730951
Processing 0 Global OptionSets
Wrote 0 Global OptionSets - 00:00:00.0000138
Code written to C:\dev\test\Messages\msdyncrm_GetReactions.cs.
Code written to C:\dev\test\Messages\msdyn_CreateTrainEffortModelConfig.cs.
Completed Writing Code File - 00:00:00.1031454
but with some sample message filtering:
pac modelbuilder build -a -o .-enf "dummy"-mnf "msdyn*"
the result (please note: 859 messages and 821 actions written to files):
Connected to... xxxx
Connected as xxxx
Begin Reading Metadata from MetadataProviderService
Begin Reading Metadata from Server
Read 0 Entities
Read 0 Global OptionSets
Read 859 SDK Messages
Completed Reading Metadata from Server - 00:00:32.4963200
Completed Reading Metadata from MetadataProviderService - 00:00:32.5003595
Begin Writing Code File
Processing 0 Entities
Wrote 0 Entities - 00:00:00.0000236
Processing 859 Messages
Wrote 821 Messages - 00:00:00.3648441
Processing 0 Global OptionSets
Wrote 0 Global OptionSets - 00:00:00.0000256
Code written to C:\dev\test\Messages\msdyncrm_GetReactions.cs.
(several hundred lines)
Code written to C:\dev\test\Messages\msdyncrm_GetPages.cs.
Completed Writing Code File - 00:00:01.4401909
I believe the root cause of the issue is the fetchxml which pac is using to query Dataverse for messages:
I have the problem with
pac modelbuilder build
verb on an environment with a lot of entities - in my case, I'm using Dynamics CRM + Omnichannel + Marketing + Portal. The command used is e.g.the result (please note: 136 messages and only 2 actions written to files):
but with some sample message filtering:
the result (please note: 859 messages and 821 actions written to files):
I believe the root cause of the issue is the fetchxml which pac is using to query Dataverse for messages:
After testing this query, it doesn't return paging-cookie, which implies a limit of 50k records - https://learn.microsoft.com/en-us/power-apps/developer/data-platform/org-service/paging-behaviors-and-ordering#legacy-paging .. A slight modification of the query (m internal order - in sdkmessagerequestfield link-entity) after execution returns a paging cookie:
.. but maybe such modification can affect the non-deterministic resultset (https://learn.microsoft.com/en-us/power-apps/developer/data-platform/org-service/paging-behaviors-and-ordering#ordering-and-multiple-table-queries). Perhaps a better solution would be built-in exclusion of standard messages like Create, Update, Delete and so on.
The issue also applies to the crmsvcutil.exe tool and other tools that use it, e.g. daryllabar/DLaB.Xrm.XrmToolBoxTools#307
The text was updated successfully, but these errors were encountered: