NAV 2013 Web Services & automatic Dataset refresh problem

mib_usr_vao
Member Posts: 12
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.
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.
0
Comments
-
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!0 -
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.0 -
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!0 -
Concerning the Codeunit, when I run the Codeunit (Refreshing Page Code) in the Job Queue I get an error mentioning
Navserver not allow callback client0 -
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!0 -
mib_usr_vao wrote: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-8410 -
(posting error)Best regards / Venlig hilsen
Johannes Sebastian
MB7-840,MB7-8410
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