Hello folks,
In Business Central, our client has exposed page web services. Hence I am able to consume the SOAP based page service of Customer, Contact, etc.
Using these web services, I can create Customer or Contact record separately from a C# Console application. But can't link Customer to a Contact or vice versa. It generates an error when Customer object has a reference to Contact.No.
Error: Message=Contact CT000055 <contact_name> is not related to customer 5025 <customer_name>.
From BC web UI, I can create a Contact (Type = Company) and then from Actions menu, I can create an associated Customer for this Contact. By doing so, the Contact gets linked to a Customer. I am trying to achieve the same results using the C# code with SOAP based page services.
Further if a Customer record is created (without any Contact) from UI then it automatically creates a Contact (type=Company) with same name as Customer. I would like to know if this has been configured intentionally. Rather is this feature hindering the C# code to link a Customer to Contact.
Please suggest the appropriate C# code to create a Customer record linked to a Contact.