Friday, March 11, 2022

Deploy error "Cannot edit a record in Batch job"

Microsoft Dynamics 365 for Operations & Financials

Encountered a problem when deploying an ISV the other day.
03/11/2022 10:29:31: Infolog diagnostic message: 'System Job should be scheduled to run within 7 day(s) of last execution time' on category 'Error'.
03/11/2022 10:29:31: Infolog diagnostic message: 'Recurrence validation failed' on category 'Error'.
03/11/2022 10:29:31: Infolog diagnostic message: 'Cannot edit a record in Batch job (BatchJob).
The corresponding AOS validation failed.' on category 'Error'.
03/11/2022 10:29:40: Application configuration sync failed. Microsoft.Dynamics.AX.Framework.Database.TableSyncException: Custom action threw exception(s), please investigate before synchronizing again: 'ErrorException:Cannot edit a record in Batch job (BatchJob).


I found a solution in the dynamics community:

Step 1 : Select * from classidtable where name = 'SysFeatureTranslationPopulationBatch'
Step 2 : Get the ID, and Run --> Select batchjobid from batch where classnumber = RecId
Step 3 : Get the batchjobid, and Run --> Select * from BATCHJOB where RECID = batchjobid
Step 4: Update Batchjob set enddatetime=getdate()-1 where recid = batchjob RecId

No comments:

Post a Comment