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:
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
Comments
SalesLine.setrange("Document Type",SalesLine."Document Type"::Order);
SalesLine.setrange("Type",SalesLine."Type"::item);
SalesLine.setfilter("Outstanding Quantity",'<>0');
However, it returns the following error:
I've just been informed that this is because the PO No. in this table is for Direct Ship POs.
There must be another way
What are you expecting?
FD Consulting