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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

How to set contact number in sales invoice out of box api.

(0) ShareShare
ReportReport
Posted on by 15

I have one customer suppose Customer 1 and four contact suppose Contact 1, 2, 3 and 4 which are associated with this customer. I wanted to create a new sales invoice using out of box sales invoice api

POST - api.businesscentral.dynamics.com/.../{{Tenant}}/{{Environment}}/api/beta/companies(XYZ)/salesInvoices?$expand=salesInvoiceLines

BODY

In body I wanted to set contact number suppose Contact 3, So can anyone suggest me in which field I can add contact number.

I reviewed the sales invoice api but it only contains "contactId" field, I tried that too but new sales invoice was created with default contact instead of picking contact id from posted json.

So, please give your suggestion it will work or should I create a new custom api. Any input will be helpful.

  • Suggested answer
    Suresh Kulla Profile Picture
    50,280 Super User 2026 Season 1 on at

    I don't see contactId in the API, I would suggest to create a custom API with the contact or you could create a subscriber on the table to populate a different contact on the validation of customer.

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

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 665 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 418 Super User 2026 Season 2

#3
Teagen Boll Profile Picture

Teagen Boll 280 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans