Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Error invoking CodeUnit 7000 Sales Price Calculation

(0) ShareShare
ReportReport
Posted on by

Hi,

I'm trying to invoke Code Unit 7000 to get the sales price matrix and my NAV service dies and I get 3 errors in the Application Log:

This is how I have defined my code unit:

codeunit7000.PNG

I would really appreciate any help on this, alternately  I would like to know if there is other way to calculate the price matrix.

These are the erros I get in the Application Log:

ERROR 1:

Faulting application name: Microsoft.Dynamics.Nav.Server.exe, version: 8.0.38798.0, time stamp: 0x5477809f
Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000
Exception code: 0x80131623
Fault offset: 0x000007fe98dd8201
Faulting process id: 0x4b18
Faulting application start time: 0x01d0ec48e18bcbf0
Faulting application path: C:\Program Files\Microsoft Dynamics NAV\80\Service\Microsoft.Dynamics.Nav.Server.exe
Faulting module path: unknown
Report Id: 5988c65f-583c-11e5-9fb2-a4badb485759

ERROR 2:

Server instance: DynamicsNAV80IM-Test
User: IMPMEXSERVER\Innacio
Type: System.NotSupportedException
Message: RecordReference
StackTrace:
at Microsoft.Dynamics.Nav.Types.XmlTypeHelper.SimpleTypesSupportedInWebservice(NavType navType)
at Microsoft.Dynamics.Nav.Types.XmlTypeHelper.XmlTypeNameFrom(NavType type)
at Microsoft.Dynamics.Nav.Service.WebServices.ServiceCodeunitWsdlAdapter.VisitParameter(ComplexTypeBuilder typeBuilder, ParameterInfo parameter)
at Microsoft.Dynamics.Nav.Service.WebServices.ServiceCodeunitWsdlAdapter.VisitInputParameters(ComplexTypeBuilder typeBuilder, ParameterInfo[] parameterInfo)
at Microsoft.Dynamics.Nav.Xsd.ElementBuilder.CreateType(ComplexType complexDelegate)
at Microsoft.Dynamics.Nav.Xsd.XsdBuilder.CreateElement(String name, ElementNumber cardinality, ElementType elementDelegate)
at Microsoft.Dynamics.Nav.Service.WebServices.ServiceCodeunitWsdlAdapter.VisitMethod(MethodInfo method, PortBuilder port, BindingBuilder binding)
at Microsoft.Dynamics.Nav.Service.WebServices.ServiceCodeunitWsdlAdapter.VisitMethods(IEnumerable`1 methods)
at Microsoft.Dynamics.Nav.Service.WebServices.ServiceCodeunitWsdlAdapter.Write(XmlTextWriter output, Uri requestUrl)
at Microsoft.Dynamics.Nav.Service.WebServices.ServiceBroker.MetadataFor(WebServiceUrlInfo relivantURLPart, Uri orginal, TextWriter output)
at Microsoft.Dynamics.Nav.Service.WebServices.ServiceBroker.Invoke(Boolean isSoapMessage, Uri url, XmlReader input, TextWriter output, NavUserAuthentication navUserAuth)
Source: Microsoft.Dynamics.Nav.Types
HResult: -2146233067

ERROR 3:

Application: Microsoft.Dynamics.Nav.Server.exe
Framework Version: v4.0.30319
Description: The application requested process termination through System.Environment.FailFast(string message).
Message: System.NotSupportedException: RecordReference
at Microsoft.Dynamics.Nav.Types.XmlTypeHelper.SimpleTypesSupportedInWebservice(NavType navType)
at Microsoft.Dynamics.Nav.Types.XmlTypeHelper.XmlTypeNameFrom(NavType type)
at Microsoft.Dynamics.Nav.Service.WebServices.ServiceCodeunitWsdlAdapter.VisitParameter(ComplexTypeBuilder typeBuilder, ParameterInfo parameter)
at Microsoft.Dynamics.Nav.Service.WebServices.ServiceCodeunitWsdlAdapter.VisitInputParameters(ComplexTypeBuilder typeBuilder, ParameterInfo[] parameterInfo)
at Microsoft.Dynamics.Nav.Xsd.ElementBuilder.CreateType(ComplexType complexDelegate)
at Microsoft.Dynamics.Nav.Xsd.XsdBuilder.CreateElement(String name, ElementNumber cardinality, ElementType elementDelegate)
at Microsoft.Dynamics.Nav.Service.WebServices.ServiceCodeunitWsdlAdapter.VisitMethod(MethodInfo method, PortBuilder port, BindingBuilder binding)
at Microsoft.Dynamics.Nav.Service.WebServices.ServiceCodeunitWsdlAdapter.VisitMethods(IEnumerable`1 methods)
at Microsoft.Dynamics.Nav.Service.WebServices.ServiceCodeunitWsdlAdapter.Write(XmlTextWriter output, Uri requestUrl)
at Microsoft.Dynamics.Nav.Service.WebServices.ServiceBroker.MetadataFor(WebServiceUrlInfo relivantURLPart, Uri orginal, TextWriter output)
at Microsoft.Dynamics.Nav.Service.WebServices.ServiceBroker.Invoke(Boolean isSoapMessage, Uri url, XmlReader input, TextWriter output, NavUserAuthentication navUserAuth)
Stack:
at System.Environment.FailFast(System.String, System.Exception)
at Microsoft.Dynamics.Nav.Service.WebServices.ServiceBroker.Invoke(Boolean, System.Uri, System.Xml.XmlReader, System.IO.TextWriter, Microsoft.Dynamics.Nav.Runtime.NavUserAuthentication)
at Microsoft.Dynamics.Nav.Service.WebServices.NavWebService+<>c__DisplayClass5+<>c__DisplayClass7.<ProcessMessage>b__3()
at Microsoft.Dynamics.Nav.Service.WebServices.Disposer.Scope(Code)
at Microsoft.Dynamics.Nav.Service.WebServices.NavWebService.ProcessMessage(System.ServiceModel.Channels.Message)
at DynamicClass.SyncInvokeProcessMessage(System.Object, System.Object[], System.Object[])
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(System.Object, System.Object[], System.Object[] ByRef)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(System.ServiceModel.Dispatcher.MessageRpc ByRef)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(System.ServiceModel.Dispatcher.MessageRpc ByRef)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(System.ServiceModel.Dispatcher.MessageRpc ByRef)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean)
at System.ServiceModel.Dispatcher.ChannelHandler.DispatchAndReleasePump(System.ServiceModel.Channels.RequestContext, Boolean, System.ServiceModel.OperationContext)
at System.ServiceModel.Dispatcher.ChannelHandler.HandleRequest(System.ServiceModel.Channels.RequestContext, System.ServiceModel.OperationContext)
at System.ServiceModel.Dispatcher.ChannelHandler.AsyncMessagePump(System.IAsyncResult)
at System.Runtime.Fx+AsyncThunk.UnhandledExceptionFrame(System.IAsyncResult)
at System.Runtime.AsyncResult.Complete(Boolean)
at System.Runtime.InputQueue`1+AsyncQueueReader[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Set(Item<System.__Canon>)
at System.Runtime.InputQueue`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].EnqueueAndDispatch(Item<System.__Canon>, Boolean)
at System.Runtime.InputQueue`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].EnqueueAndDispatch(System.__Canon, System.Action, Boolean)
at System.ServiceModel.Channels.SingletonChannelAcceptor`3[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Enqueue(System.__Canon, System.Action, Boolean)
at System.ServiceModel.Channels.HttpPipeline+EnqueueMessageAsyncResult.CompleteParseAndEnqueue(System.IAsyncResult)
at System.ServiceModel.Channels.HttpPipeline+EnqueueMessageAsyncResult.HandleParseIncomingMessage(System.IAsyncResult)
at System.Runtime.AsyncResult.SyncContinue(System.IAsyncResult)
at System.ServiceModel.Channels.HttpPipeline+EmptyHttpPipeline.BeginProcessInboundRequest(System.ServiceModel.Channels.ReplyChannelAcceptor, System.Action, System.AsyncCallback, System.Object)
at System.ServiceModel.Channels.HttpChannelListener`1+HttpContextReceivedAsyncResult`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].ProcessHttpContextAsync()
at System.ServiceModel.Channels.HttpChannelListener`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].BeginHttpContextReceived(System.ServiceModel.Channels.HttpRequestContext, System.Action, System.AsyncCallback, System.Object)
at System.ServiceModel.Channels.SharedHttpTransportManager.EnqueueContext(System.IAsyncResult)
at System.ServiceModel.Channels.SharedHttpTransportManager.OnGetContextCore(System.IAsyncResult)
at System.Runtime.Fx+AsyncThunk.UnhandledExceptionFrame(System.IAsyncResult)
at System.Net.LazyAsyncResult.Complete(IntPtr)
at System.Net.ListenerAsyncResult.IOCompleted(System.Net.ListenerAsyncResult, UInt32, UInt32)
at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32, UInt32, System.Threading.NativeOverlapped*)

*This post is locked for comments

  • Suggested answer
    keoma Profile Picture
    32,727 on at
    RE: Error invoking CodeUnit 7000 Sales Price Calculation

    you'll find the answer in the log.

    System.Environment.FailFast(string message).

    Message: System.NotSupportedException: RecordReference

    at Microsoft.Dynamics.Nav.Types.XmlTypeHelper.SimpleTypesSupportedInWebservice

    check the parameters of the called webservice methods. all of them should be simple types.

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Microsoft Dynamics NAV (Archived)

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2

#1
mmv Profile Picture

mmv 2

#1
Amol Salvi Profile Picture

Amol Salvi 2

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans