Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Batch Error - cannot create a record in Has Conditions (batch Constraints). the corresponding AOS validation failed.

Posted on by 1,289

Hi,

I got the below error while running a batch 

Microsoft.Dynamics.Ax.Xpp.ErrorException: Exception of type 'Microsoft.Dynamics.Ax.Xpp.ErrorException' was thrown.
at Microsoft.Dynamics.Ax.MSIL.Interop.throwException(Int32 ExceptionValue)
at Microsoft.Dynamics.Ax.MSIL.cqlCursorIL.InsertInto(IntPtr targetTable, List`1 fields, List`1 ops, IntPtr sourceTable)
at Microsoft.Dynamics.Ax.Xpp.Common.InsertInto(FieldList fieldList, Common sourceCursor)
at Dynamics.Ax.Application.BatchInfo.Save(BatchHeader _header) in BatchInfo.save.xpp:line 46
at Dynamics.Ax.Application.BatchHeader.Addtasks() in BatchHeader.addTasks.xpp:line 10
at Dynamics.Ax.Application.BatchHeader.Save() in BatchHeader.save.xpp:line 8
at Dynamics.Ax.Application.BOMCalcJobItemTaskBatchManager.Createbatchtasks(BOMCalcJob_All _bomCalcJob_All) in BOMCalcJobItemTaskBatchManager.createBatchTasks.xpp:line 51
at Dynamics.Ax.Application.BOMCalcJob_All.Runbatch() in BOMCalcJob_All.runBatch.xpp:line 11
at Dynamics.Ax.Application.BOMCalcJob_All.Run() in BOMCalcJob_All.run.xpp:line 33
at Dynamics.Ax.Application.BatchRun.runJobStaticCode(Int64 batchId) in BatchRun.runJobStaticCode.xpp:line 54
at Dynamics.Ax.Application.BatchRun.runJobStatic(Int64 batchId) in BatchRun.runJobStatic.xpp:line 13
at BatchRun::runJobStatic(Object[] )
at Microsoft.Dynamics.Ax.Xpp.ReflectionCallHelper.MakeStaticCall(Type type, String MethodName, Object[] parameters)
at BatchIL.taskThreadEntry(Object threadArg)

Guide me how to fix this. How to find what is causing the error and how to fix this?

Thanks,

Lakshmi

*This post is locked for comments

  • Verified answer
    Lakshmi Karambakkam Profile Picture
    Lakshmi Karambakkam 1,289 on at
    RE: Batch Error - cannot create a record in Has Conditions (batch Constraints). the corresponding AOS validation failed.

    www.cnblogs.com/.../4582829.html

    the changes mentioned in the above link ssolved the issue.

  • Lakshmi Karambakkam Profile Picture
    Lakshmi Karambakkam 1,289 on at
    RE: Batch Error - cannot create a record in Has Conditions (batch Constraints). the corresponding AOS validation failed.

    I tried debugging the code and found the below errors.

    CostRoll_5F00_bomCalcWhereUsedList_5F00_XPPerror.png

    CostRoll_5F00_bomCalcWhereUsedList_5F00_XPPerror.png

    How to find where is the info and how to tie the information while debugging?

  • Suggested answer
    A.Prasanna Profile Picture
    A.Prasanna 8,163 on at
    RE: Batch Error - cannot create a record in Has Conditions (batch Constraints). the corresponding AOS validation failed.

    Are you guys using Load Balancing for Batch Server(s) ? ,

    Check below link , hope this will help.

    dynamics-ax-live.blogspot.com/.../what-about-error-corresponding-aos.html

    Thanks & Regards,

    Amith Prasanna

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans