Query on Sales Header (filter by customer)

Rikarddo
Member Posts: 80
Hi all,
I created a simple query calculating for all customers the items and quantity bought.
Expanded Type Data Source Name Method Type Method Group By
1 DataItem Item Ledger Entry <Item_Ledger_Entry> No
0 Column Item No. <Item_No> None Yes
0 Column Source No. <Source_No> None Yes
0 Column Quantity <Sum_Quantity> Totals Sum No
Then created a page to list the query
Expanded Type SubType SourceExpr Name Caption
1 Container ContentArea <Control1000000000> <Control1000000000>
1 Group Repeater General <General>
0 Field Number <Number> <Number>
0 Field ProdutosCliente.Item_No Nº Produto <Nº Produto>
0 Field ProdutosCliente.Source_No Nº Cliente <Nº Cliente>
0 Field ProdutosCliente.Sum_Quantity Quantidade <Quantidade>
OnOpenPage()
ProdutosCliente.OPEN;
WHILE ProdutosCliente.READ DO
NoOfrows:=NoOfrows+1;
ProdutosCliente.CLOSE;
SETRANGE(Number,1,NoOfrows);
CLEAR(ProdutosCliente);
ProdutosCliente.OPEN;
OnClosePage()
ProdutosCliente.CLOSE;
OnFindRecord(Which : Text) : Boolean
OnNextRecord(Steps : Integer) : Integer
OnAfterGetRecord()
IF NOT ProdutosCliente.READ THEN
EXIT;
After that my goal is to create an action button on the Sales Order Form, with this code, but only to list the products of the sales header sell to customer no.
How can i filter that?
I created a simple query calculating for all customers the items and quantity bought.
Expanded Type Data Source Name Method Type Method Group By
1 DataItem Item Ledger Entry <Item_Ledger_Entry> No
0 Column Item No. <Item_No> None Yes
0 Column Source No. <Source_No> None Yes
0 Column Quantity <Sum_Quantity> Totals Sum No
Then created a page to list the query
Expanded Type SubType SourceExpr Name Caption
1 Container ContentArea <Control1000000000> <Control1000000000>
1 Group Repeater General <General>
0 Field Number <Number> <Number>
0 Field ProdutosCliente.Item_No Nº Produto <Nº Produto>
0 Field ProdutosCliente.Source_No Nº Cliente <Nº Cliente>
0 Field ProdutosCliente.Sum_Quantity Quantidade <Quantidade>
OnOpenPage()
ProdutosCliente.OPEN;
WHILE ProdutosCliente.READ DO
NoOfrows:=NoOfrows+1;
ProdutosCliente.CLOSE;
SETRANGE(Number,1,NoOfrows);
CLEAR(ProdutosCliente);
ProdutosCliente.OPEN;
OnClosePage()
ProdutosCliente.CLOSE;
OnFindRecord(Which : Text) : Boolean
OnNextRecord(Steps : Integer) : Integer
OnAfterGetRecord()
IF NOT ProdutosCliente.READ THEN
EXIT;
After that my goal is to create an action button on the Sales Order Form, with this code, but only to list the products of the sales header sell to customer no.
How can i filter that?
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