Hi, has anyone else experienced this, as it’s got us baffled. We have a form run from the customer card which shows Sales invoice lines for that customer. Our problem is that sometimes this is lightning fast, however you can close the form, go back in, and it will lock your Navision session for 3-4 minutes. The RunFormLink is Sell-to Customer No.=FIELD(No.) The SourceTableView is SORTING(Sell-to Customer No.,Type,Quantity,Shipment Date) ORDER(Ascending) WHERE(Type=CONST(Item),Quantity=FILTER(>0)) We are using Attain 3.60 on SQL 2000. This behaviour also happens on our development server as well. Any help would be appreciated [:)] Many thanks
ouch! Don’t put decimal fields in a key. Really don’t! unless you can’t live without. [;)] And if you do place a decimal in a key, place at the end. So your key should be : Sell-to Customer No.,Type,Shipment Date,Quantity
btw : The filter on quantity is the thing that makes your application slow. And why sometimes it’s as fast as lightnig is coursed by the number of records Navision has to filter. So a customer with a lot of sales invoice lines will lock the table a lot! I think the best thing you can do is deleting qty from the key and your filter. And find a other solution to filter all 0 lines out. You could do something like: 1.) Program the onfind, onnext and all the other triggers on the form (not really an option, to must work) 2.) create a boolean field in the lines which will be set in true id qty is not 0 or greater then 0. Add this field to a key. Best thing to use it a the first field in a key. 3.) Not set a filter at all and make the user work a little. (not really an option, to must work) I think you should go for option 2.
Thanks for your reply - I was unaware you shouldn’t use decimals in keys - We have them all over the place![:0] I don’t think this is related to number of rows returned though - It is fast then locked for the same customer. Even though you’d think the subsequent times you view the form the data would have maybe been cached by SQL? I will try removing Quantity, thanks again.
Cash would make faster indeed. and yw