Options

NAV 2016 - Object of type CodeUnit with ID XXX could not be found

drstakzdrstakz Member Posts: 30
Hi,
I have a strange problem with a new NAV 2016 (CU6). If I try run own codeunit like CU 50000 with code MESSAGE('Hello'); I get always RTC message "Object of type CodeUnit with ID 50000 could not be found". Of course DEV licence for 2016.

I tried:
- restart RTC
- recompile all objects - some fails with not used addons (unknow variables for older version of dot net dll)
- sync with validate all
- restart server instance
- build server aplication objects
- renumber this CU
- export CU to fob, remove and import back
(Various combinations of this)

Event log at server or workstation nothing, just error message

It a little crazy/ghostly

First time a same CU worked.

Any ideas ??
Thx!

Answers

  • Options
    Peter+is1Peter+is1 Member Posts: 174
    Hi,

    could it be a problem with SQL permissions, not being able to write to/update the metadata tables?
    \\
    The truth exists in seven versions.
  • Options
    drstakzdrstakz Member Posts: 30
    SQL permissions for this db are db_owner for me and also for NAV service user (service user has datareader, datawriter and ddladmin too, but I think that owner has this privileges as well).
  • Options
    Peter+is1Peter+is1 Member Posts: 174
    Hi,

    Can you see anything in the SQL server log? Can you start a SQL trace?
    Have you tried on a different computer and under a different user account?

    Can you check the service account against the MS recommendations?

    Let us know what you find, good luck.
    \\
    The truth exists in seven versions.
  • Options
    drstakzdrstakz Member Posts: 30
    SQL server log - nothing

    But now I tried create new CU at position where was different CU - If I try run this CU (new) that is started previous CU (currently not existing). So problem is with synchronization.?
    But if I make Schema synchronize no erros are detected - but i mean that this is only for tables, but CU??
    maybe remove metadata blob directly from sql ??

    I will have to try another computer/user account.
  • Options
    drstakzdrstakz Member Posts: 30
    Problem with "Build Server Application Objects"?? diference between SQL metadata a dll??
  • Options
    drstakzdrstakz Member Posts: 30
    When I used a same NAV server instance for different db and joined problematic db later back to this server instance, problem was solved - CU was lost and if I created new CU at same position/name so worked.
  • Options
    Peter+is1Peter+is1 Member Posts: 174
    good you have some result, but still weird...
    \\
    The truth exists in seven versions.
  • Options
    drstakzdrstakz Member Posts: 30
    Hi,
    I'm possible found cause of my problem. Today, I'm uploaded some CU to my projects database NAV90_Project in DEV environment and launched some table (only for RFT start from DEV). When RTC was started, I had only one company Cronus?? companies of my project didn't available (?). So I checked server instance in DEV environment (File-Database-Info) and selected instance was for clear DVD (?), only this instance was available (my DVD instance is connected to DVD database, project instance to project db). I tried change instance in DEV (in options) but without effect. After stopped dvd instance and restart dev environment, correct instance was selected, but my CU was lost. When I again start RTC from DEV, projects companies (db) was available.

    What happens if I make synchronization? If DEV environment with some db is connected with bad NAV instance (with various db) ?? Build Server Application objects..?

    I'm afraid it will be necessary always check selection instance in DEV.
Sign In or Register to comment.