Quantcast
Channel: AX Developer Forum
Viewing all articles
Browse latest Browse all 9880

wEB SERVICES

$
0
0

Hi All,

I am gettng following error when I try to modify record using MS dynamics nav webservices.

Element "Key" in namespace "urn:microsoft-dynamics-schemas/page/ws_customer" is missing from the message!

My code is like,

 

 

 

 

 

 

 

 

 

 

 

 

 

WS_Customer_Service

 

custService = newWS_Customer_Service();

 

custService.UseDefaultCredentials =

true;

custService.Credentials =

new System.Net.NetworkCredential("username", "pw");

 

 

WS_Customer Cust = newWS_Customer();

 

 

 

//Create Customers---------------------

 

 

try

{

Cust.No = txtNo.Text;

Cust.Name = txtName.Text;

Cust.Name_2 = txtName2.Text;

Cust.Address = txtAddress.Text;

Cust.Address_2 = txtAddress2.Text;

Cust.City = comboBox1.Text;

 

//txtPostCode.Text;

Cust.Country_Region_Code = comboCountry.Text;

Cust.Phone_No = txtPhoneNo.Text;

Cust.E_Mail = txtEmail.Text;

Cust.Gen_Bus_Posting_Group = comboGenBus.Text;

Cust.VAT_Bus_Posting_Group = comboVatBusPosGr.Text;

Cust.Customer_Posting_Group = comboCusBusPosGr.Text;

 

 

custService.Update(

ref Cust);

custService.Create(

ref Cust);

 

 

 

}

 

 

catch (Exception ex){

 

 

MessageBox.Show(ex.Message);

 

 

//custService.Update(ref Cust);

 

 

WS_Customer Cust2 = newWS_Customer();

custService.Update(

ref Cust2);

}

CAN ANY ONE TELL ME HOW TO SOLVE THIS?


Viewing all articles
Browse latest Browse all 9880

Trending Articles