From 2484864bbb78c032ad32ff3fa684355c9180df07 Mon Sep 17 00:00:00 2001 From: James Gunn Date: Wed, 24 Jan 2024 16:17:19 +0000 Subject: [PATCH] Use the primary key for ordering in SyncAll* jobs (#1107) --- .../src/TeachingRecordSystem.Core/Jobs/SyncAllMqsFromCrmJob.cs | 2 +- .../TeachingRecordSystem.Core/Jobs/SyncAllPersonsFromCrmJob.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/TeachingRecordSystem/src/TeachingRecordSystem.Core/Jobs/SyncAllMqsFromCrmJob.cs b/TeachingRecordSystem/src/TeachingRecordSystem.Core/Jobs/SyncAllMqsFromCrmJob.cs index 4db756d25..148d189f1 100644 --- a/TeachingRecordSystem/src/TeachingRecordSystem.Core/Jobs/SyncAllMqsFromCrmJob.cs +++ b/TeachingRecordSystem/src/TeachingRecordSystem.Core/Jobs/SyncAllMqsFromCrmJob.cs @@ -46,7 +46,7 @@ public async Task Execute(CancellationToken cancellationToken) Criteria = filter, Orders = { - new OrderExpression(dfeta_qualification.Fields.CreatedOn, OrderType.Ascending) + new OrderExpression(dfeta_qualification.PrimaryIdAttribute, OrderType.Ascending) }, PageInfo = new PagingInfo() { diff --git a/TeachingRecordSystem/src/TeachingRecordSystem.Core/Jobs/SyncAllPersonsFromCrmJob.cs b/TeachingRecordSystem/src/TeachingRecordSystem.Core/Jobs/SyncAllPersonsFromCrmJob.cs index f243ed90e..8f0e3acf8 100644 --- a/TeachingRecordSystem/src/TeachingRecordSystem.Core/Jobs/SyncAllPersonsFromCrmJob.cs +++ b/TeachingRecordSystem/src/TeachingRecordSystem.Core/Jobs/SyncAllPersonsFromCrmJob.cs @@ -41,7 +41,7 @@ public async Task Execute(CancellationToken cancellationToken) Criteria = filter, Orders = { - new OrderExpression(Contact.Fields.CreatedOn, OrderType.Ascending) + new OrderExpression(Contact.PrimaryIdAttribute, OrderType.Ascending) }, PageInfo = new PagingInfo() {