Error when running code unit on RTC

rhardoyal
Member Posts: 78
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
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
0
Answers
-
first thing you need to do in this case is simply compile single/all object(s) and try0
-
already tried the compilation several times and still getting the error.0
-
You can try deleting the entry for object in Object Metadata table 2000000071,and recreate the entry in table by recompiling the object0
-
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.0
-
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...0 -
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.
Oliver0 -
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...0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions