Skip to main content

Notifications

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++

  • Verified answer
    Mohit Rampal Profile Picture
    Mohit Rampal 12,552 Super User 2024 Season 1 on at
    RE: Error detected

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

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

  • Verified answer
    Mohit Rampal Profile Picture
    Mohit Rampal 12,552 Super User 2024 Season 1 on at
    RE: Error detected

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

    pastedimage1683887632399v2.png

  • GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 on at
    RE: Error detected

    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.

  • M_R Profile Picture
    M_R 123 on at
    RE: Error detected

    pastedimage1683887286496v1.png

  • Verified answer
    GirishS Profile Picture
    GirishS 27,821 Super User 2024 Season 1 on at
    RE: Error detected

    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.

  • Mohit Rampal Profile Picture
    Mohit Rampal 12,552 Super User 2024 Season 1 on at
    RE: Error detected

    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/.../

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

Announcing Our 2025 Season 1 Super Users!

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

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,965 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,817 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans