NAV web service error. Any1 help?

txerifftxeriff Member Posts: 500
edited 2014-04-29 in NAV Three Tier
Hi all,

I hope someone can help me or give me a clue with this :)

This is the current error on the event viewer of the service:
Error en ejecucion planificador: System.Web.Services.Protocols.SoapException: Se llamó al Id. de función 1000000000. El objeto con el Id. 99000919 no tiene un miembro con ese Id.
   en System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   en System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   en Planificador.Negocio.PlanificadorTareas.PlanificadorDeTareas()
   en Planificador.Servicios.srvWinPlanificador.miTimer_Elapsed(Object sender, ElapsedEventArgs e)

Para obtener más información, vea el Centro de ayuda y soporte técnico en

So it says something about function with ID 100000000000 was called and thenthe object with ID 99000919 (no idea wich one is that, I think it could be a function id into a codeunit) doesn´t have a member with that ID.

the code is as simple as this. If I remove it, it works.
CASE JobSchedSetup."Object Type" OF
  jobschedsetup."Object Type"::Codeunit:
    begin     
      if jobschedsetup.id='2' then
        begin
          c50141.run;
            JobSchedSetup."Message Text" := 'OK';
        end;
    end;
END;

Any ideas?

many thanks!

Comments

  • geordiegeordie Member Posts: 655
    Can you delete the Object Metadata for Page 99000919 Production Forecast, compile it again and check if the error persists?
    Is c50141 is a custom codeunit, isn't it?
  • txerifftxeriff Member Posts: 500
    geordie wrote:
    Can you delete the Object Metadata for Page 99000919 Production Forecast, compile it again and check if the error persists?
    Is c50141 is a custom codeunit, isn't it?


    hi,

    thanks for the answer.

    this clients runs on forms and i haven´t changed anything.

    yep that codeunit is custom but it runs perfectly from object designer.
  • txerifftxeriff Member Posts: 500
    Does any1 know how I could trace it? the service runs a custom codeunit and into this I try to run another codeunit (c50141.run )


    I tried to put message('error here') but it doesn´t raise as error in event viewer, so I can´t trace where is that error.
  • kinekine Member Posts: 12,562
    this clients runs on forms and i haven´t changed anything.

    Do not forget that webservices are using pages and not forms. It means, if there is form reffered somewhere in the code, than page with same ID and functionality must exists. And of course, webservice will error out on it because you cannot use pages inside webservice (it is problem of some standard code which calls functions from forms/pages even when do not show the form itself...).
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • txerifftxeriff Member Posts: 500
    kine wrote:
    this clients runs on forms and i haven´t changed anything.

    Do not forget that webservices are using pages and not forms. It means, if there is form reffered somewhere in the code, than page with same ID and functionality must exists. And of course, webservice will error out on it because you cannot use pages inside webservice (it is problem of some standard code which calls functions from forms/pages even when do not show the form itself...).


    Holy dust! I didn´t know that... I just checked and the code developed in the form is not in the page as they don´t use pages. Code coverage shows that it uses some functions from there.

    Thanks a lot for the help.
  • txerifftxeriff Member Posts: 500
    Hi all again.

    Thanks for the help.

    Now it seems like it doesn´t hang up there but no error is given on service event viewer . So, no clue...

    It works like this:

    -web service calls a custom CU
    -This custom CU looks what jobs need to be run (codeunits) and does a codeunit.run(objectid)
    -it works for the rest of tasks (CUs). It´s just a single CU not working.


    any ideas?
  • kinekine Member Posts: 12,562
    Again, check the CU if it is "compatible" to run without GUI (no dialogs, no confirms, no forms/pages used). Check if there are not used some external libraries, or if it is trying to print some report. You cannot print from webservices...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • txerifftxeriff Member Posts: 500
    kine wrote:
    Again, check the CU if it is "compatible" to run without GUI (no dialogs, no confirms, no forms/pages used). Check if there are not used some external libraries, or if it is trying to print some report. You cannot print from webservices...


    removed all dialogs already. when running manually nothing is displayed.

    we plan to keep a form running with ontimer event as it´s already in use for other tasks.
Sign In or Register to comment.