Options

Microsoft.Dynamics.Nav.Types.Exceptions.NavNCLCallbackNotAll

balhiniobalhinio Member Posts: 28
edited 2011-06-08 in NAV Three Tier
Hi All,

I have exposed a Navision webservice to create a paiment but the sevrer return an exeption:
the following is the trace:

Type: Microsoft.Dynamics.Nav.Types.Exceptions.NavNCLCallbackNotAllowedException
SuppressMessage: False
FatalityScope: None
Message: Les fonctions de rappel ne sont pas autorisées.
StackTrace:
à Microsoft.Dynamics.Nav.Runtime.NavConnection.get_ClientCallback()
à Microsoft.Dynamics.Nav.Runtime.NavForm.RunModal(NavRecord record, Int32 fieldNo)
à Microsoft.Dynamics.Nav.Runtime.NavForm.RunModal(Boolean isInLookupTrigger, Boolean isLookup, Int32 formId, NavRecord record, Int32 fieldNo)
à Microsoft.Dynamics.Nav.Runtime.NavForm.RunModal(Boolean isInLookupTrigger, Boolean isLookup, Int32 formId, NavRecord record)
à Microsoft.Dynamics.Nav.BusinessApplication.Codeunit230.TemplateSelection(Int32 formID, Int32 _FormTemplate, Boolean recurringJnl, INavRecordHandle genJnlLine, ByRef`1 jnlSelected)
à Microsoft.Dynamics.Nav.BusinessApplication.Codeunit230.OnInvoke(Int32 memberId, Object[] args)
à Microsoft.Dynamics.Nav.Runtime.NavApplicationObjectBase.Invoke(Int32 methodId, Object[] arguments)
à Microsoft.Dynamics.Nav.BusinessApplication.Page255.OnOpenPage()
à Microsoft.Dynamics.Nav.Runtime.NavForm.OpenForm()
à Microsoft.Dynamics.Nav.Service.WebServices.ServiceForm..ctor(NavForm theForm)
à Microsoft.Dynamics.Nav.Service.WebServices.ServiceForm..ctor(Int32 formId)
à Microsoft.Dynamics.Nav.Service.WebServices.ServiceFormXmlAdapter..ctor(Int32 formId, String theServiceName)
à Microsoft.Dynamics.Nav.Service.WebServices.MetadataManager.FindSoapAdapter(String fullName)
à Microsoft.Dynamics.Nav.Service.WebServices.ServiceBroker.DispatchSoap(UrlParser relivantURLPart, XmlReader input, TextWriter output)
à Microsoft.Dynamics.Nav.Service.WebServices.ServiceBroker.Invoke(Boolean isSoapMessage, String serviceName, Uri url, XmlReader input, TextWriter output)
à Microsoft.Dynamics.Nav.Service.WebServices.NavWebService.<>c__DisplayClass2.<>c__DisplayClass4.<ProcessMessage>b__1()
à Microsoft.Dynamics.Nav.Service.WebServices.Disposer.Scope(Code code)
à Microsoft.Dynamics.Nav.Service.WebServices.NavWebService.<>c__DisplayClass2.<ProcessMessage>b__0(StreamWriter streamWriter)
à Microsoft.Dynamics.Nav.Service.WebServices.WCFUtil.GetPopulatedMemoryStream(StreamFillingCallback callback)
à Microsoft.Dynamics.Nav.Service.WebServices.NavWebService.ProcessMessage(Message message)
à SyncInvokeProcessMessage(Object , Object[] , Object[] )
à System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
à System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
à System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
à System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc)
à System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc& rpc)
à System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc& rpc)
à System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc& rpc)
à System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)

I do some reserch and I found that the error is related to the server returns the exception when trying to invoke a dialog UI through a Web service.

Any help. Thanks.

Comments

  • Options
    horinashorinas Member, Microsoft Employee Posts: 4
    When exposing page/codeunit as a web service, the code should not use end-user confirmation dialog boxes, message boxes, or constructs that will result in a UI interaction . Because a Web service runs independently of a user interface, running this type of code causes the code to throw an exception.

    More information about handling UI interaction when working with web services can be found at http://msdn.microsoft.com/en-us/library/dd301080.aspx
    Horina Serbanescu
    SDE II
    Dynamics Nav Client
    Microsoft

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Options
    ara3nara3n Member Posts: 9,255
    I also want to add that if you have any code in CU 1 onopen company etc, like opening a form that shows the current Company, database etc, make sure that you have it changed. to

    IF GUIALLOWED THEN
    //Run some form etc.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • Options
    postsauravpostsaurav Member Posts: 708
    Hi Rashed,
    ara3n wrote:
    also want to add that if you have any code in CU 1 onopen company etc, like opening a form that shows the current Company, database etc, make sure that you have it changed. to

    IF GUIALLOWED THEN
    //Run some form etc.

    I am trying to open a page (say customer) in company open trigger. i tired to use the function GUIALLOWED but the RTC Still Crashed after doing it.

    Please let me know is there any other way to do this.

    Regards,
    Saurav dhyani

    Thanks & Regards,
    Saurav Dhyani

    Do you Know this About NAV?


    Connect - Twitter | Facebook | Google + | YouTube

    Follow - Blog | Facebook Page | Google + Page
Sign In or Register to comment.