Flowfield is not getting Updated (Nav sql database).

ajaybabuCh
Member Posts: 208
Hi
Navision SQL Database :
I have two tables TmpSalesHeader and TmpSalesLine which are copy of Sales Header and Sales Line.
Amount field in TmpSalesHeader is flow field which is the sum of Sales Lines amount based on
Document Type, External Doc No and CustomerField key.
I have defined a secondary key "Document Type, External Doc No and CustomerField" with SumIndex Field as Amount in
TmpSales Line Table.
One third party tool will insert the data into TmpSalesHeader and TempSalesLine.
When third party tool inserts data in both TmpSales Header and TmpSalesLine,
All the TmpSalesHeader amounts are appearing as zero when I run TmpSalesHeader table.
I have disabled the Key for the SumIndex field from TmpSales Line and saved and compiled TmpSalesLine table.
Again I have enabled the SumIndex field key from TmpSalesLine table and try to save and compile, it has done some reindex process for the TmpSalesLine data.
Then I went into TmpSalesHeader and looked at the Amount field, all the amounts are with proper value.
Do I need to always disable and enable the Key for the SumIndex Field?
Do we have any other way to reindex ?
Thanks and Regards
Ajay
Navision SQL Database :
I have two tables TmpSalesHeader and TmpSalesLine which are copy of Sales Header and Sales Line.
Amount field in TmpSalesHeader is flow field which is the sum of Sales Lines amount based on
Document Type, External Doc No and CustomerField key.
I have defined a secondary key "Document Type, External Doc No and CustomerField" with SumIndex Field as Amount in
TmpSales Line Table.
One third party tool will insert the data into TmpSalesHeader and TempSalesLine.
When third party tool inserts data in both TmpSales Header and TmpSalesLine,
All the TmpSalesHeader amounts are appearing as zero when I run TmpSalesHeader table.
I have disabled the Key for the SumIndex field from TmpSales Line and saved and compiled TmpSalesLine table.
Again I have enabled the SumIndex field key from TmpSalesLine table and try to save and compile, it has done some reindex process for the TmpSalesLine data.
Then I went into TmpSalesHeader and looked at the Amount field, all the amounts are with proper value.
Do I need to always disable and enable the Key for the SumIndex Field?
Do we have any other way to reindex ?
Thanks and Regards
Ajay
Ajay
0
Comments
-
Hi
If you show AMOUNT field in your header form, the value will be calculated automaticaly in your table.
Reards0 -
We have not created user interface for these tables.
we used to run the table and see the amount, sometiems it is zero, some times with some negative amount
always it is not correct amount.
Process Is :
Third Party tool inserts data into TmpSalesHeader and TmpSalesLine
From these tables one of Navision Codeunit will create Actual Sales Invoice and Sales Lines.
ThanksAjay0 -
Hi again
I know what you are doing, but Navision standar tables have the same "bug" ???
If you RUN Sales Header table and you push Ctrl + F8, Amount field is 0.
If you show Amount field in the form and you run again then table, Amount field is the real amount of the order, invoice, ....
Maybe you can detete Amount Flowfied and use a normal Field. In your importation process, calculate the amount using a repeat .... isn't the best solution, but ....
Or create a form for this Temp table.
Bye0 -
Nav 5.0SP1. using SQL database
let me explain the problem clearly.
Amount field is the flow field in tmp sales header table.
SumIndex field defined in tmpsales lines table.
Third party tool inserts data into tmpSales header and tmpSales lines table.
when I goto object desinger and run tmpSales header table and see the amoun field , I found that it is with wrong amount value.
Then I went to tmpSales lines and disable the key which is pointing to the sum Index field saved and compiled.
After that , I have again enable the key. Saved and compiled. When compiling and saving, it has reindexed the data.
Now I have run the tmpSales Header table again from the object designer. All the amounts are proper now.
Is there any other way to reIndex?Ajay0 -
Saalek wrote:Hi again
I know what you are doing, but Navision standar tables have the same "bug" ???
...
That is not a bug ](*,) can you imagine the insanity of calculating every flow field every time even if it i not used, your system would be slow beyond belief. This is a smart and very important feature.
Also I don't think this has any connection what so ever to the OP's issue.David Singleton0 -
David Singleton wrote:Saalek wrote:Hi again
I know what you are doing, but Navision standar tables have the same "bug" ???
...
That is not a bug ](*,) can you imagine the insanity of calculating every flow field every time even if it i not used, your system would be slow beyond belief. This is a smart and very important feature.
Also I don't think this has any connection what so ever to the OP's issue.0 -
Belias wrote:David Singleton wrote:That is not a bug ](*,) can you imagine the insanity of calculating every flow field every time even if it i not used, your system would be slow beyond belief. This is a smart and very important feature.
Also I don't think this has any connection what so ever to the OP's issue.
Which is why I said that I don't think there is any connection. :whistle:David Singleton0 -
Belias wrote:ok David, now after rereading everything it's more clear... :roll:
now, i renew my question: this "third party tool" does insert data directly in sql or through NAV client?
Hi again.
The problem isn't in the third party tool. [-X [-X
1 -Take NAV 6.0 database (without modifications)
2- Run Sales Header table
3- Push Ctrl + F8 to zoom a record. Field Amount is = 0
4- Go to Sales Order or Sales invoice form (The card form) and show Amount field
5- Go back to table 36 and surprise, Amount field <> 0
Why #-o #-o #-o
It is a extrange Navision ...... curiosity :whistle: :whistle: :whistle:
Bye0 -
Push Ctrl + F8 to zoom a record. Field Amount is = 0
As far as I know flowfields are never calculated when Zooming the record.
It's not a :bug: , it's just the way it works.
Salut!Laura Nicolàs
Author of the book Implementing Dynamics NAV 2013
Cursos Dynamics NAV (spanish) : http://clipdynamics.com/ - A new lesson released every day.0 -
ok, understood...the "step by step" made me able to replicate your "issue"...that actually it is not a an issue
calcformula of "sales header".amount isSum("Sales Line".Amount WHERE (Document Type=FIELD(Document Type),Document No.=FIELD(No.)))
amount field on sales lines (zoom a sales line to see it) of the same document is 0, unless you release the document: this implies that "sales header".amount flowfield is 0, because it is the sum of the "sales line".amount field on the same document.
If you release the document, just take a look at the zoom window of the sales line to see that amount field is evaluated; obviously, the amount on the header is then populated, too.
If you have an automated process and you want to automatically release all documents, just take a look at the onpush trigger of Functions->Release menuitem:ReleaseSalesDoc.PerformManualRelease(Rec);
0
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