Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Batch task failed: Access denied: XYZController

(0) ShareShare
ReportReport
Posted on by 185

Hi guys I created a batch job using SysOperationFramework class so what I did I created there classes

  1. Contract Class
  2. Controller Class which is extending SysOperationServiceController class.
  3. Service Class which is extending SysOperationServiceBase class

As shown in the below screenshots

2022_2D00_06_2D00_14_5F00_20_2D00_59_2D00_01.png

2022_2D00_06_2D00_14_5F00_20_2D00_59_2D00_49.png

After I created an action menu item and give It the following properties

2022_2D00_06_2D00_14_5F00_21_2D00_07_2D00_38.png

But wen I am running my batch job from the UI it is giving me the following error

2022_2D00_06_2D00_14_5F00_14_2D00_27_2D00_14.png

When I am running my batch job from Visual studio by setting it as a startup object it running and working fine. I search for this problem but mostly I am getting the answers for AX 2012 which is obsolete now.

  • Martin Dráb Profile Picture
    231,748 Most Valuable Professional on at
    RE: Batch task failed: Access denied: XYZController

    You're trying to do the same thing twice. You've created a controller class and defined the method to be called there. But then you've create a menu item that completely ignores your controller and defines the method to be called in Parameters.

    What did you set as the startup object? If the controller class, the menu item is ignored. If the menu item, the controller class is ignored.

    By the way, my preferred way is using a controller class and setting the operation in its constructor.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,884 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,748 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans