NAV 2013 Web Services & automatic Dataset refresh problem

mib_usr_vaomib_usr_vao Member Posts: 12
edited 2013-05-30 in NAV Three Tier
Dear all,

I am halfway a project requiring the integration of NAV 2013 with a third party MYSQL-PHP application. This is happening through NAV Page Web Services which run OK.

However, there is a complication: during the first step of the integration, I INSERT and UPDATE data from our official NAV 2009 SP1 to NAV 2013 through SQLS Stored Procedures. When the SPs run, the NAV 2013 tables are updated but this is not happening on the NAV 2013 page. When I manually refresh (F5) the data appear on the page and it only when I proceed to a OnValidate action on the page (e.g. edit a record) that the new data are added to the Web Service dataset.

Consequently, I have realized that the dataset is properly refreshed only when OnValidate runs on the Page. I had a second failure when I tried the Codeunit Web Service. After applying an OnValidate function on a Codeunit and exposing it as a Web Service through an XML port, I run it through a Job Queue: it goes OK but when I INSERT/UPDATE new data to NAV2013 DB the Function comes to an error stopping the Job Queue.

Is there any way to automatically bring the new data without applying an OnValidate function (e.g. through a button on the page). Thank you very much for your time and attention.

Comments

  • krikikriki Member, Moderator Posts: 9,112
    Try with a refresh-function with a "selectlatestversion;" in it.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • mib_usr_vaomib_usr_vao Member Posts: 12
    Thank you very much for your answer.

    I need to clarify that my original aim was to have the dataset refreshed automtaically without forcing the user to open/refresh/validate the NAV page; now I wonder whether this is possible at all.
  • krikikriki Member, Moderator Posts: 9,112
    I don't think that is possible. The Dynamics NAV server caches records in memory to avoid sending too many requests to SQL Server and to enhance performance. The negative is that it can take some time before the table is refreshed in the Dynamics NAV server.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • mib_usr_vaomib_usr_vao Member Posts: 12
    Concerning the Codeunit, when I run the Codeunit (Refreshing Page Code) in the Job Queue I get an error mentioning
    Navserver not allow callback client
  • krikikriki Member, Moderator Posts: 9,112
    I've seen the error before, but I not completely sure about the reason. If I remember correctly, I think there is some CONFIRM or dialogbox that wants to open and those are not allowed with the NAS.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • Johannes_NielsenJohannes_Nielsen Member Posts: 206
    Concerning the Codeunit, when I run the Codeunit (Refreshing Page Code) in the Job Queue I get an error mentioning
    Navserver not allow callback client

    As kriki points out, this error ("callback") is due to the NAS not being able to handle any user input or GUI of any kind

    (Does your codeunit "Refreshes Page Code"...if you actually run the page via NAS, then that will explain the callback error I guess ) :)
    Best regards / Venlig hilsen
    Johannes Sebastian
    MB7-840,MB7-841
  • Johannes_NielsenJohannes_Nielsen Member Posts: 206
    (posting error)
    Best regards / Venlig hilsen
    Johannes Sebastian
    MB7-840,MB7-841
Sign In or Register to comment.