NAV SW : using dotnet and record datatype?

usherbrooke
Member Posts: 10
Hello
I want to save the record in the item table to another table copy article (article copy) by using a web service.
- I have published the page 22
- And I use this code C/AL :
address := 'http://localhost:7047/DynamicsNAV/WS/CRONUS France S.A/Page/Customers';
navBinding := navBinding.BasicHttpBinding;
navBinding.Security.Mode := 4;
navBinding.MaxReceivedMessageSize(100000);
navBinding.Security.Transport.ClientCredentialType := 4;
CustomerService := CustomerService.Customers_PortClient(navBinding,endpointAddress.EndpointAddress(address));
CustomerService.ClientCredentials.Windows.AllowedImpersonationLevel := 4;
MyCustomerList := CustomerService.ReadMultiple(CustomerFilter,'',100);
FOR i := 0 TO MyCustomerList.Length() - 1 DO BEGIN
Customer := MyCustomerList.GetValue(i);
//****
CopyCust."No." := Customer.No;
//...etc...
Copycust.insert;
//****
END;
Variable :
opyCust Record Copy Customer
navBinding DotNet 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.ServiceModel.BasicHttpBinding
endpointAddress DotNet 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.ServiceModel.EndpointAddress
Customer DotNet 'Customer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.Customer.ServiceReference1.Customers
CustomerService DotNet 'Customer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.Customer.ServiceReference1.Customers_PortClient
MyCustomerList DotNet 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.Array
CustomerFilter DotNet 'Customer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.Customer.ServiceReference1.Customers_Filter
address Text 256
i Integer
How to save the record in the table? Field by field in the loop? Or is there exists a method such as the transferfields :-) ?
Thank you for your answers,
Kind regards
I want to save the record in the item table to another table copy article (article copy) by using a web service.
- I have published the page 22
- And I use this code C/AL :
address := 'http://localhost:7047/DynamicsNAV/WS/CRONUS France S.A/Page/Customers';
navBinding := navBinding.BasicHttpBinding;
navBinding.Security.Mode := 4;
navBinding.MaxReceivedMessageSize(100000);
navBinding.Security.Transport.ClientCredentialType := 4;
CustomerService := CustomerService.Customers_PortClient(navBinding,endpointAddress.EndpointAddress(address));
CustomerService.ClientCredentials.Windows.AllowedImpersonationLevel := 4;
MyCustomerList := CustomerService.ReadMultiple(CustomerFilter,'',100);
FOR i := 0 TO MyCustomerList.Length() - 1 DO BEGIN
Customer := MyCustomerList.GetValue(i);
//****
CopyCust."No." := Customer.No;
//...etc...
Copycust.insert;
//****
END;
Variable :
opyCust Record Copy Customer
navBinding DotNet 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.ServiceModel.BasicHttpBinding
endpointAddress DotNet 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.ServiceModel.EndpointAddress
Customer DotNet 'Customer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.Customer.ServiceReference1.Customers
CustomerService DotNet 'Customer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.Customer.ServiceReference1.Customers_PortClient
MyCustomerList DotNet 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.Array
CustomerFilter DotNet 'Customer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.Customer.ServiceReference1.Customers_Filter
address Text 256
i Integer
How to save the record in the table? Field by field in the loop? Or is there exists a method such as the transferfields :-) ?
Thank you for your answers,
Kind regards
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