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 :
Small and medium business | Business Central, N...
Suggested Answer

The metadata object CodeUnit 50139 was not found.

(0) ShareShare
ReportReport
Posted on by 65

Hi,
I have got this unexpcted error in the job queue "The metadata object CodeUnit 50139 was not found.". I created a job queue which runs the code unit to import products using external api call. I uploaded .app extension file and installed it on the sandbox environment and configure job queue which successfully started at the specific time.

The job queue runs almost 42000 iteration and imported around 9000 products. The job time out was 18 hours but it ran almost 9 hours which i checked last time the job queue was in InProcess state it was not stopped.

When i checked in the morning the job queue was stopped due to this error. The metadata object CodeUnit 50139 was not found.

pastedimage1674210254153v1.png

I got this error 2 times yesterday, The first time the same error occurred when i ran job queue By clicking the Run Once Fore Ground Option and as i closed the tab i got this error.

The 2nd time i got this error when i run the project in the debugging mode and set job queue to run on the specific time and when i stopped debugging i got this error again for that job.

To avoid this i created .app file and uploaded and set it's time to start it automatically on a specific time but after almost 9 hours i got this error again in the sandbox environment in this time i didn't do anything.

What could be the possible reason of this and how I can solve this issue i am struggling to know the actual reason of this?

Is there any way from where i can see actual cause of error and system generated exceptions?

I have the same question (0)
  • Suggested answer
    Marco Mels Profile Picture
    on at

    Hello,

    Difficult to say form here, but there may be more information in application event log file related to The metadata object CodeUnit 50139 was not found.

    Thank you.

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,105 Moderator on at

    I can not help you with that specific error. But one design tips would be to try to avoid creating jobs that runs processing for that many hours in one transaction scope.

    You should try to reduce the workload that is handled for each iteration of the job queue job.

  • Suggested answer
    YUN ZHU Profile Picture
    95,331 Super User 2025 Season 2 on at

    Hi, Weird problem, this looks like your objects are not compiled correctly. But you mentioned Sandbox, so this should be the SaaS version.

       

    How did you upload the app files? If you publish directly from VS Code, it may be automatically uninstalled during Minor Update.

    Hope this helps.

    Thanks.

    ZHU

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 > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,143

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,694 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,067 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans