Hi,
I am unable to set the customer's Gen. Bus. Posting Group and Customer Posting Group using the business central API, as I see no fields exposed for the same.
The customer endpoint being used is below:
https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/api-reference/v2.0/api/dynamics_customer_create
This means that we are unable to create an invoice to business central for a new customer using the API.
If we try to create an invoice without setting these fields, the below error occurs:
Application_FieldValidationException:Gen. Bus. Posting Group must have a value in Customer: No.=11. It cannot be zero or empty. CorrelationId: 662bd19f-6643-4971-82c1-d55e1d08705c.
The user is having to manually go in to the website to set these fields for each new customer.
For an existing customer this works fine (as the details are already filled in).
I have read in some answers that we can setup customer templates (with default values) for this. But then how to specify which template to use when creating the customer using the API.
Can anyone help me out please? An example would be really helpful.
Thanks
Inte
