Error when running code unit on RTC

rhardoyalrhardoyal Member Posts: 78
edited 2013-08-30 in NAV Three Tier
Hi,

Am getting the following error when trying to run a code unit on RTC. Note that the code unit is running fine on classic

Metadata for object of type CodeUnit with id 8009174 is in a failed state. This is caused by a previous exception:

Compilation of assembly 'C:\ProgramData\Microsoft\Microsoft Dynamics NAV\60\Server\MicrosoftDynamicsNavServer\assembly\Codeunit8009174.dll' failed. This can be caused by differences between binaries in your installation or your database. Ensure that all installation components are consistent and up to date. Error details: c:\ProgramData\Microsoft\Microsoft Dynamics NAV\60\Server\MicrosoftDynamicsNavServer\source\Codeunit\Codeunit8009174.cs(7946,53) : error CS1001: Identifier expected

Any help.

Thanks,
Rizwana

Answers

  • mohana_cse06mohana_cse06 Member Posts: 5,503
    first thing you need to do in this case is simply compile single/all object(s) and try
  • rhardoyalrhardoyal Member Posts: 78
    already tried the compilation several times and still getting the error.
  • navinbnavinb Member Posts: 51
    You can try deleting the entry for object in Object Metadata table 2000000071,and recreate the entry in table by recompiling the object
  • I have this error once or twice. It happened to me when i used the CALCDATE function. I used an integer field as the first argument to the function in stead of a dateformula. This will compile just fine in the classic client, but it raised an error in the RTC. In the classic, you only get an error during runtime.
  • jversusjjversusj Member Posts: 489
    I know this is an old, dusty thread, but I am now encountering this issue in NAV2013.

    I have a custom codeunit ID 50067. It has a single parameter (table record as VAR). When I try to call the function I get the following error.
    Microsoft Dynamics NAV

    Compilation of assembly 'C:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\assembly\Codeunit50067_1133.dll' failed. This can be caused by differences between binaries in your installation or your database. Ensure that all installation components are consistent and up to date. Error details: c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(435,56) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(463,56) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(496,75) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(535,68) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(567,77) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(587,79) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(617,77) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(647,56) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(658,56) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(666,76) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(717,71) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(739,85) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(742,68) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(826,78) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(849,76) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(854,58) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(879,78) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(886,58) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(890,58) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(894,57) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(901,54) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(918,77) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(950,31) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(955,31) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(996,64) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1001,41) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1113,74) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1157,74) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1177,64) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1182,70) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1206,67) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1211,70) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1236,50) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1242,70) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1266,65) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1271,70) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1295,65) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1300,70) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1316,60) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1322,57) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1333,58) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1364,58) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1379,60) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1393,55) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1397,58) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1416,45) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1437,82) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1444,63) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1465,47) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1479,47) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1492,86) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1499,67) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1506,61) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1513,41) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1520,45) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1549,39) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1626,75) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1631,58) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1661,57) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1706,37) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1708,37) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1710,37) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1783,35) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1809,55) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1815,66) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1860,35) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1862,37) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1956,71) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(1981,53) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(2018,55) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context
    c:\ProgramData\Microsoft\Microsoft Dynamics NAV\70\Server\MicrosoftDynamicsNavServer$NAV70\source\Codeunit\Codeunit50067.cs(2025,42) : error CS0119: 'Microsoft.Dynamics.Nav.BusinessApplication.Codeunit50067.DataError(Microsoft.Dynamics.Nav.Runtime.INavRecordHandle)' is a 'method', which is not valid in the given context

    OK

    I checked my build in dev environment (7.00.34845) and windows client (7.0.34845.0). I have deleted all code from my Codeunit and put a simple MESSAGE('Hi') but the call fails every time. I deleted the Object Metadata per another post, but the problem persists.

    This CU worked fine in our old 3.7B environment and it compiles without issue in 2013.

    Any other ideas?
    kind of fell into this...
  • okioki Member Posts: 46
    Hi,
    sounds like a difference between CA/L object and .NET/c#/code. Try this:
    Make a Textexport of the object. Then delete the object from the database, reimport the textexport and compile it.
    This could help to delete any metadata and forces NAV to rebuild the c# files from scratch.

    Oliver
  • jversusjjversusj Member Posts: 489
    thanks - we ended up removing variables 1 by 1 this AM and finally got it to run. It seems one of our legacy variable names is now a true NAV function/method? Nothing jumped out at a glance, but I changed some variables and function names and now it works.

    Weird.
    kind of fell into this...
Sign In or Register to comment.