Inserts via SQL doesn't update Flow Fields


I have a question ? Suppose I am trying to make a post of purchase & Sale of a particular
Item in the Item Ledger Table (Guys dont shout this is just an example) via the Query
Analzyer …say some inserts …will my Inventory column (A Flow Field) will get updated

My colleagues say that it wont even touch it unless it is posted via Navision.[:O]
Is it true ? Why ? Doesn’t the triggers get activated ?

If yes then whats the workaround for the same?
I want to make some entries in some table which has a FLOW Field in it.
I want that to be calculated dynamically.

Your expertise & comments are really appreciated.


Your colleagues are fully right. NAV is the only one aware of all busniess logic and SQL trigger are not used. If you do not have deep knowledge of both NAV and SQL keep away from this as far as possible.

It’s not completely correct to say SQL triggers aren’t used. I have seen errors in NAV caused by SQL code in triggers.

But unless you plan on replicating the business logic in SQL, and updating it every time you update NAV code, then it’s not the way to go. You should do most actions from within the NAV Interface. Otherwise you’re begging for trouble later on, whether it’s errors or data inconsistency or something else.

You are right, Max. But from a business logic perspective they aren’t used.

You can

  1. create staging tables to pass the data then have a routine in Navision to create the jounrnals.
  2. Use remote tables to link the Navision database direct to the other SQL database.
  3. Use NAS to update
  4. Use web services.

There are plenty of ways, you just need to learn them.