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() {