web
You’re offline. This is a read only version of the page.
close
Skip to main content
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.

I have the same question (0)
  • Martin Dráb Profile Picture
    236,353 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

Responsible AI policies

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

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 2,028

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 878 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 579 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans