NAV SW : using dotnet and record datatype?

usherbrookeusherbrooke Member Posts: 10
edited 2011-09-07 in NAV Three Tier
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.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;

Variable :
opyCust Record Copy Customer
navBinding DotNet 'System.ServiceModel, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.ServiceModel.BasicHttpBinding
endpointAddress DotNet 'System.ServiceModel, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.ServiceModel.EndpointAddress
Customer DotNet 'Customer, Version=, Culture=neutral, PublicKeyToken=null'.Customer.ServiceReference1.Customers
CustomerService DotNet 'Customer, Version=, Culture=neutral, PublicKeyToken=null'.Customer.ServiceReference1.Customers_PortClient
MyCustomerList DotNet 'mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089'.System.Array
CustomerFilter DotNet 'Customer, Version=, 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
Sign In or Register to comment.