web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Create a BC Customer linked to a Contact using Page web services

(1) ShareShare
ReportReport
Posted on by 15

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.

I have the same question (0)
  • Suggested answer
    divyeshchitte Profile Picture
    968 on at

    Make sure that all your Customer's have a Contact created with a Type of Company for the Customer. If they don't Create Contacts from Customer and then you can Create the Contact under that customer

    For eg:

    Contact No Type Company No
    C001 Company C001 This will Be your Customer
    C002 Person C001 This will Be your Contact
  • Ajay Chawla Profile Picture
    15 on at

    Hi Divyesh,

    Thanks for the response.

    The Contacts are created as Type=Company. But I can't find a code (C# code using BC page services) to create a BC customer from these Contact.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

News and Announcements

Season of Giving Solutions is Here!

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,638

#2
YUN ZHU Profile Picture

YUN ZHU 837 Super User 2025 Season 2

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 704 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans