web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Got Error "Cannot edit a record in Batch transactions (Batch). The corresponding AOS validation failed" when adding a new email address in Batch Tasks > Parameters >Destinations >E-mail

(0) ShareShare
ReportReport
Posted on by

I need to add one more person to receive this report. This report was scheduled to run as a batch job. I found the batch job in System Administration >Inquiries >Batch jobs. I have set the status of this batch job to 'Withhold'. Then click 'View Tasks' > click Parameters >click Destinations...>Click E-mail > add a new email address in the To: textbox >click Ok >click Close then I got error "Cannot edit a record in Batch transactions (Batch). The corresponding AOS validation failed"

Does that mean I can't edit the batch job. The only way to do it is to create a new batch job?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Iulian Cordobin Profile Picture
    8,201 on at

    Looking at the method aosValidateUpdate in the Batch table it seems you will have to meet several condition to change the values in a batch job. I think you might be falling into one of these cases that do not allow you to update a batch. They are:

            // quit if the user is not a batch-operator or if it's not the AOs
            changecompany(this.Company)
            {
                if (!Batch::isPrivilegedUser(this.CreatedBy))
                {
                    return false;
                }
            }

            // ensure not to update the following column
            if (this.Company != this.orig().Company ||
                this.BatchJobId != this.orig().BatchJobId
                || this.DataPartition != this.orig().DataPartition
                )
            {
                return false;
            }

            if (currentUser != this.CreatedBy &&
                (this.Parameters != this.orig().Parameters ||
                this.ClassNumber != this.orig().ClassNumber))

            {
                return false;
            }

  • Verified answer
    Tim Schofield Profile Picture
    on at

    Hi Anna, Julian's correct. To edit the parameters of a batch job you have to be the user that created the batch job and the batch job status has to be 'Withhold'. So it's maybe not the best idea to setup production batch jobs from a normal user log-in. If that user leaves ( and you disable the user) the batch job stops, and as discussed, you have to be logged on as that user to change the parameters. So may be best to use a service account type log in to setup production batch jobs - but maybe that requires another licence?

  • Suggested answer
    Community Member Profile Picture
    on at

    Please consider following steps

    Refresh the cache

    Perform Full compilation and CIL compilation

    please verify and update us with your findings

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans