Dynamics Nav 2013 web application

蹲街弑〆低调 提交于 2020-01-13 06:27:07

问题


I want to create web application (sth like dashboard) which will be integrated with nav 2013. (Take data form Nav, display it to customers and also can update or insert data).

In Nav I have done all tables and pages which have specificed all conditions and functions on fields.

Those conditions are very usefull when you want to insert some data from page in Nav (for example: after filling customer number, page automatically show projects for this customer - what is very helpfull)

Everything is working fine in Navision when you working on pages, but in my application where I use webservices to communicate with NAV I have a lots of problems which those conditions which are specified on tables.

My question is, it is better to prepare "blank" tables in nav and make full logic in my web application(asp.net) or operate on logic which is specified in Nav?

In my opinion:

  • tables should not have any logic except some basic logic about keys numbering
  • all conditions that are designed to help user fill data should be done separately (separate logic in web app and separate logic in pages in Nav)

回答1:


Based on comments I'd say go for the simpliest solution:

  • Create a set of tables (lets call them integration tables) which will have no logic on them and will not be related to the Nav entities (like Tasks or Projects or whatever tables you have in your base). This will be tables for communication only.
  • Create dispatcher codeunit which will carry most of communication and data transformation logic.
  • Publish dispatcher codeunit and pages based on integration tables.
  • Use published pages to push messages to Nav and read data from Nav.
  • After every pushed message call curtain dispatcher method to do all the things you want (like insert and update records to Nav)
  • Use OData, Pages or codeunit functions returning XML to read all the data you need to display on web forms. My advice is do not update/insert Nav native tables directly (via pages), only through integration tables and dispatcher. It will be easier to manage errors in this case.
  • Delete old or processed records from integration tables periodically.

This will allow you to keep most of business logic on web app side but also preserv the ability to put some general logic (such as restrictions and etc) to Nav (via dispatcher and table triggers), as dispatcher will always return you an operation result weather message sent from web application was processed successfully or not.

Be aware, there may be pitfalls.



来源:https://stackoverflow.com/questions/24054999/dynamics-nav-2013-web-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!