Structure order line details Form PROBLEM!!!

suvidha
Member Posts: 117
Hi,
From purchase order when i enter the structure order line details the form hangs and ill have to open new session of NAV!! ](*,) Please help
[-o< [-o<
From purchase order when i enter the structure order line details the form hangs and ill have to open new session of NAV!! ](*,) Please help

0
Comments
-
Hi the structure order line details table has 11 million records so when we try to open structure order line details from purchase order the navision hangs.
the code on purch line form is
StrOrderLineDetails.RESET;
StrOrderLineDetails.SETRANG(Type,StrOrderLineDetails.Type::Purchase);
StrOrderLineDetails.SETRANGE("Document Type","Document Type");
StrOrderLineDetails.SETRANGE("Document No.","Document No.");
StrOrderLineDetails.SETRANGE("Item No.","No.");
StrOrderLineDetails.SETRANGE("Line No.","Line No.");
StrOrderLineDetailsForm.SETTABLEVIEW(StrOrderLineDetails);
StrOrderLineDetailsForm.RUNMODAL;
END;
PLEASE HELP [-o<0 -
Try setting appropriate key using SETCURRENTKEY on the StrOrderLineDetails Rec variable ..... :-k
StrOrderLineDetails.RESET;
StrOrderLineDetails.SETCURRENTKEY(***,***,***,,,,,,);
StrOrderLineDetails.SETRANG(Type,StrOrderLineDetails.Type::Purchase);
StrOrderLineDetails.SETRANGE("Document Type","Document Type");
StrOrderLineDetails.SETRANGE("Document No.","Document No.");
StrOrderLineDetails.SETRANGE("Item No.","No.");
StrOrderLineDetails.SETRANGE("Line No.","Line No.");
StrOrderLineDetailsForm.SETTABLEVIEW(StrOrderLineDetails);
StrOrderLineDetailsForm.RUNMODAL;
END;Sandeep Prajapati
Technical Consultant, MS Dynamics NAV0 -
hi,
i tried
StrOrderLineDetails.RESET;
StrOrderLineDetails.SETCURRENTKEY(Type,"Document Type","Document No.","Item No.","Line No.");StrOrderLineDetails.SETRANGE(Type,StrOrderLineDetails.Type::Purchase);
StrOrderLineDetails.SETRANGE("Document Type","Document Type");
StrOrderLineDetails.SETRANGE("Document No.","Document No.");
StrOrderLineDetails.SETRANGE("Item No.","No.");
StrOrderLineDetails.SETRANGE("Line No.","Line No.");
IF StrOrderLineDetails.FIND('-') THEN
BEGIN
StrOrderLineDetails.SETCURRENTKEY(StrOrderLineDetails."Calculation Order");
StrOrderLineDetailsForm.SETTABLEVIEW(StrOrderLineDetails);
StrOrderLineDetailsForm.RUNMODAL;
END;;
still does not help but when i comment
StrOrderLineDetails.SETCURRENTKEY(StrOrderLineDetails."Calculation Order"); then its very fast but structure calculation order will not be sorted!0 -
Hi Suvidha,IF StrOrderLineDetails.FIND('-') THEN
change the FIND('-') to findfirstSandeep Prajapati
Technical Consultant, MS Dynamics NAV0 -
Hi Suvidha,
Could you consider making a new key in the table
["Calculation Order",Type,"Document Type","Document No.","Item No.","Line No."] and then
StrOrderLineDetails.RESET;
StrOrderLineDetails.SETCURRENTKEY("Calculation Order",Type,"Document Type","Document No.","Item No.","Line No.");
StrOrderLineDetails.SETRANGE(Type,StrOrderLineDetails.Type::Purchase);
StrOrderLineDetails.SETRANGE("Document Type","Document Type");
StrOrderLineDetails.SETRANGE("Document No.","Document No.");
StrOrderLineDetails.SETRANGE("Item No.","No.");
StrOrderLineDetails.SETRANGE("Line No.","Line No.");
IF StrOrderLineDetails.FINDFIRST THEN
BEGIN
// removed
StrOrderLineDetailsForm.SETTABLEVIEW(StrOrderLineDetails);
StrOrderLineDetailsForm.RUNMODAL;
END;Sandeep Prajapati
Technical Consultant, MS Dynamics NAV0 -
hey thanks for reply the problem was with DB fragmentation i had to Run DBCC DBREINDEX SQL side... :P0
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