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

Notifications

Announcements

Community site session details

Community site session details

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

Error detected

(0) ShareShare
ReportReport
Posted on by 123

How to fix the error, unexpected token 'public' specified outside the scope of any class or model element in d35 x++

I have the same question (0)
  • Mohit Rampal Profile Picture
    12,565 Moderator on at

    Hi, Its suggesting that public keyword is found in the file or code where it should not be. Please share where you are getting this error.

    Also, check this article

    www.daxrunbase.com/.../

  • Verified answer
    GirishS Profile Picture
    27,829 Moderator on at

    Hi,

    Probably you have added the public keyword without creating main method using runnable class.

    Can you show us the screenshot of your code?

    Thanks,

    Girish S.

  • M_R Profile Picture
    123 on at

    pastedimage1683887286496v1.png

  • GirishS Profile Picture
    27,829 Moderator on at

    Closing bracket for the class should be on the last. You have added the method outside the opening and closing brackets of the class.

    Thanks,

    Girish S.

  • Verified answer
    Mohit Rampal Profile Picture
    12,565 Moderator on at

    This bracket is the issue, add it in the end of the code. 

    pastedimage1683887632399v2.png

  • Verified answer
    Mohit Rampal Profile Picture
    12,565 Moderator on at

    M_R Please mark answer/s verified that helps and fix your issues.

    If the answers don't work then let us know.

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

News and Announcements

Season of Giving Solutions is Here!

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 843 Super User 2025 Season 2

#2
André Arnaud de Calavon Profile Picture

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

#3
Martin Dráb Profile Picture

Martin Dráb 342 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans