transfer no in the header form to line subform

karuchua
Member Posts: 151
i want to transfer my RFQ No. in the header to the lines document number but somehow my code is failing.
i have the following code on my header in a function as known as FnInsertRFQlines
then i have the following code on my RFQ nUMBER
and i have also set my subform link property right,wot am doing wrong
i have the following code on my header in a function as known as FnInsertRFQlines
LRFQLine.INIT; LRFQLine."Document Type" := "Document Type"; LRFQLine.Department := Department; LRFQLine."Document No" :="RFQ No."; LRFQLine."Created By":=USERID; LRFQLine."Date Created":="Raised Date"; LRFQLine."Transaction Date":="Posting Date"; LRFQLine.INSERT;
then i have the following code on my RFQ nUMBER
IF "RFQ No." <> '' THEN BEGIN CASE "Document Type" OF "Document Type"::RFQ: BEGIN LRFQLine.RESET; LRFQLine.SETCURRENTKEY("Document Type",Department,"Document No","Line No."); LRFQLine.SETRANGE("Document Type","Document Type"); LRFQLine.SETRANGE(Department,Department); LRFQLine.SETRANGE("Document No","No."); IF LRFQLine.FINDSET THEN LRFQLine.DELETEALL; FnInsertRFQlines(Rec); END; END; end;
and i have also set my subform link property right,wot am doing wrong
0
Comments
-
What is the exact problem?
The subformlink only transfers values with fields from the primairy key.0 -
ok, the problem is that when i do a new record,the RFQ No in the header is not being transfered to the lines,but its not part of the primary key.0
-
Just from heart, without testing, this should be programmed in the validate of the No. field. But I might be wrong.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