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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Error while saving codeunit

(0) ShareShare
ReportReport
Posted on by

Dear Experts,

I have created new code unit. while saving giving an error. Please advise

4048.error.png

Thanks

With Regards

Mandeep Kaur

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Mohana Yadav Profile Picture
    61,005 Super User 2025 Season 2 on at

    and the cursor points to which location of code?

  • Suggested answer
    Rajasekhar@MS Profile Picture
    5,569 on at

    Hi

    If you observer you have defined the No. of Runs Variable as "No. od Runs" in the AddReport function.

  • Suggested answer
    Amol Salvi Profile Picture
    18,698 on at

    It seems some of the field is wrongly typed in program . Kindly check that.

  • Suggested answer
    Binesh Profile Picture
    7,885 on at

    Hello,

    As per other members, i'm also suggesting you, Check your typing,

    and also need to pass the ReportID as integer  in function AddReport.

    Before writing the code first you need to create a Table see the screenshot

    89999.png

    After creating table start writing codeunit.

    See the bellow screenshot.

    89999.png

  • Community Member Profile Picture
    on at

    Hi,

    Thanks for your replies, I have edit the code where their is typing error. I have created a table as well before writing a codeunit as shown in the screenshot. Kindly advise.

    Thanks

    With Regards

    Mandeep Kaur 

  • Suggested answer
    Mohana Yadav Profile Picture
    61,005 Super User 2025 Season 2 on at

    so is your codeunit error solved. which screenshot are you referring?

  • Community Member Profile Picture
    on at

    Hi Mohana,

    No, error has not been resolved, I am talking about the screenshots which Binesh has sent.

    Kindly advise how to resolve this error.

    Thanks

    With Regards

    Mandeep Kaur

  • Suggested answer
    Mohana Yadav Profile Picture
    61,005 Super User 2025 Season 2 on at

    cursor is pointing to which area of code after error?

  • Binesh Profile Picture
    7,885 on at

    Hi,

    Share your code,

    Why because whatever i given that objects compiled successfully,

    I hope you created record variables.

  • Suggested answer
    Suresh Kulla Profile Picture
    50,245 Super User 2025 Season 2 on at

    In your code when you used User ID it should be USERID without any space.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
HoangNam Profile Picture

HoangNam 7

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans