Relate purchase header to sales line (Simple!)
amadman114
Member Posts: 36
Howdy,
I'm quite new to Navision, and I'd like to know how to find the sales line(s) that's related to the selected purchase header. I'm pretty sure you can do this with some simple SetRanges, but I can't see the trail.
I have found a subform that does this, which uses the following SetTableView:
However I don't really see how this works!
Thanks,
Dan
I'm quite new to Navision, and I'd like to know how to find the sales line(s) that's related to the selected purchase header. I'm pretty sure you can do this with some simple SetRanges, but I can't see the trail.
I have found a subform that does this, which uses the following SetTableView:
SORTING(Document Type,Document No.,Line No.) ORDER(Descending) WHERE(Document Type=CONST(Order),Type=CONST(Item),Outstanding Quantity=FILTER(<>0))
However I don't really see how this works!
Thanks,
Dan
0
Comments
-
SalesLine.setfilter("Purchase Order No.",<purchase order no.>);
SalesLine.setrange("Document Type",SalesLine."Document Type"::Order);
SalesLine.setrange("Type",SalesLine."Type"::item);
SalesLine.setfilter("Outstanding Quantity",'<>0');0 -
This is the same as the code that I had.
However, it returns the following error:There's no Sales Line within the filter.
Filters: Document Type: Order, Type: Item, Outstanding Quantity <>0, Purchase Order No.: PO0038630
I've just been informed that this is because the PO No. in this table is for Direct Ship POs.
There must be another way0 -
A link from PO line to SO line only exists for drop shipments or for so called special orders (in general: where a 1:1 direct link exists between a SO line and a PO line). In all other cases (POs to replenish stock) no link exists.
What are you expecting?Frank Dickschat
FD Consulting0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 328 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