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
Ajay
0
Comments
If you show AMOUNT field in your header form, the value will be calculated automaticaly in your table.
Reards
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.
Thanks
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.
Bye
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
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?
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.
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
Which is why I said that I don't think there is any connection. :whistle:
now, i renew my question: this "third party tool" does insert data directly in sql or through NAV client?
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
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:
Bye
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!
Author of the book Implementing Dynamics NAV 2013
Cursos Dynamics NAV (spanish) : http://clipdynamics.com/ - A new lesson released every day.
calcformula of "sales header".amount is 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:
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog