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, ...
Answered

Method 'Main' does not exist on class xxxx

(0) ShareShare
ReportReport
Posted on by 282
Dear All,
 
This is my class data source for my project. Recently it worked normally but when I pin debug then remove it. I don't know what's happen, but I got an error like this message below can someone guide me on how to solved it? 
 
and when I compare 2 project in the same class 1 project I got an error and another is error???
 
//////
 
////
  • Martin Dráb Profile Picture
    240,744 Most Valuable Professional on at
    I'm assuming that you run the project. The first one calls HSTStockCard menu item, the other HSTStockCardData. I don't know what these menu items call and which of them is failing, but it seems that one of tries to calls class xxxx and it can't, because it requires the class having main(Args) method, which it doesn't have. Either you shouldn't call the class or you need to add main(). If it's about the data provider class, calling it by a menu item doesn't make good sense to me.
  • Chomchanok Profile Picture
    282 on at
     
    this is flow for my app.the structure are quite normal but I don't know why I got an error. For 'main' are not exist in this class long time ago. 
    But I don't know why it's just show error to me.
     
  • Verified answer
    Martin Dráb Profile Picture
    240,744 Most Valuable Professional on at
    Calling a report data provider (RDP) class from a menu item doesn't look normal to me. What are you trying to achieve by that?
     
    These classes are called by the reporting framework when a report executes and it needs to fetch the data. If you want to to run the report, call its controller class, not the RDP class.
  • Chomchanok Profile Picture
    282 on at
     
    I apologize for forgetting to check the class name in a list. It's possible that my mouse accidentally slid and changed the class name.
    Now it's work.

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 426 Most Valuable Professional

#2
CU10121822-0 Profile Picture

CU10121822-0 358

#3
André Arnaud de Calavon Profile Picture

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

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans