Friday, September 9, 2011 11:22 AM
C# , Code , Dynamics NAV
In a previous post ( Microsoft Dynamics Nav: Using an XMLPort as a .NET DataSource and Microsft Dynamics Nav: Export XMLPort to File) I had demonstrated how to return a set of records, using Web Services, from Microsoft Dynamics Nav with an XMLPort as a dataset.
The following example demonstrates returning a filtered set of records from Microsoft Dynamics Nav through Services.
public partial class Form1 : Form
private void Form1_Load(object sender, EventArgs e)
ws = new GetCustomers_Binding();
ws.UseDefaultCredentials = true;
ws.Url = "http://localhost:7047/DynamicsNAV/WS/CRONUS%20USA,%20Inc./Codeunit/GetCustomers";
customers = new Customers();
bs = new BindingSource();
private void BindData(string salespersoncode)
ws.GetCustomers(salespersoncode, ref customers);
dataGridView1.DataSource = bs;
bs.DataSource = customers.Customer;
private void button1_Click(object sender, EventArgs e)
The sample application referenced in this post can be downloaded >>>here<<<.