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

Announcements

No record found.

News and Announcements icon
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
    240,744 Most Valuable Professional on at

    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

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

#1
Martin Dráb Profile Picture

Martin Dráb 429 Most Valuable Professional

#2
CU10121822-0 Profile Picture

CU10121822-0 366

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 360 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans