Dynamics Nav 2013 web application

2019-04-16 00:35发布

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条回答
仙女界的扛把子
2楼-- · 2019-04-16 01:17

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.

查看更多
登录 后发表回答