Part 01: Getting Started with Dynamics 365 Business Central APIs
Part 02: Understanding Microsoft Business Central Out-Of-The-Box API Endpoints
Part 03: Understanding Microsoft Business Central Custom API Endpoints
If you want to insert below address to Business Central Customer Card then how would your JSON body look like?
Field Name in BC | Data to inject |
Address | 2/34 |
Address 2 | Coliseum Drive |
City | Albany |
County | Auckland |
Country | NZ |
Postal Code | 0632 |
First Attempt:
1 | { |
Outcome :
As you can see the first attempt did not work as expected. Address and Address 2 both end up in one field.
Second Attempt :
1 | { |
Outcome:
It did work and the "Address 2" field gets filled with the data we wanted. The change I did was I added \r\n into my JSON body. \r\n is used as a newline character in Windows and this is a very common way to go to a new line.
\r\n = CR + LF → Used as a new line character in Windows
Please provide your feedback with a comment.
Thank you and Regards,
Tharanga Chandrasekara
*This post is locked for comments