Hello Guys,
I have a standalone .NET application that needs to create records in Contact table via Navision Contact Web service. The web service URL looks like below:
http://navisionservername:portno/DynamicsNAV/WS/myorg/Page/Contact
My code creates two contact records, first is of Type=Company and second is of Type=Person.
First record of Contact gets created successfully in NAV and Contact No gets displayed correctly. But person contact gets failed with below error message.
"Error: Type must be equal to 'Person' in Contact: No.=K9999. Current value is 'Company'."
I am not a Navision developer so please pardon me if I use incorrect terminology. I have inserted the code snippet here.
In case I have posted my question in wrong category, so please help me post in correct forum.
Can anyone give some pointers to fix the error.
Thanks in advance.
Contact.Contact objCompany = new Contact.Contact();
objCompany.Name = "Company Test 2017-1";
objCompany.Type = Contact.Type.Company;
objCompany.VAT_Registration_No = "5852036";
objCompany.E_Mail = "test2017@test.com";
svcContact.Create(ref objCompany);
Contact.Contact objContact = new Contact.Contact();
objContact.Name = "Contact for Company";
objContact.Type = Contact.Type.Person;
objContact.E_Mail = "test2017@test.com";
objContact.Company_No = objCompany.No;
svcContact.Create(ref objContact);
*This post is locked for comments
I have the same question (0)