Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

[URGENT] The field Tax Group Id of table Item contains a value X that cannot be found

(0) ShareShare
ReportReport
Posted on by 6
Hi
 
We have an issue for one of our customers from Belgium
 
Our application is integration between Dynamics and other system and we have an issue to create an Item through API. This is happening only for this client.
The following error occurs when we try to create an Item:
 
The field Tax Group Id of table Item contains a value ({A1272569-9819-ED11-90EB-6045BD880AA6}) that cannot be found in the related table (Tax Group)
 
This is the response we get when we fetch the Tax Groups

 
And this is the request body we are sending when we try to create an Item
 
 
Being that we are fetching the Tax Group Id from Dynamics and then using it to create an Item, there should be nothing wrong.
But it is

 
We then looked into the customers Dynamics account and how Tax Groups were set up. Everything seems to be in order.
When customer tries to create an Item manually, he sees all the Tax Groups that are available to us as well
 
 
Looking into the Tax Details of this one Tax Group, everything seem to be in order

 
This issue is happening for all the Tax Groups the customer has. We also tried to create a new Tax Group and the issue still persists.
One thing to note, customer is able to manually create an Item using Tax Group through Dynamics portal.
The issue is happening only through API.
 
Looking into Dynamics docs, I see this example for request body when trying to create an Item
 
In the documentation it's not clear which of these fields are mandatory.
For example, we are not passing taxGroupCode, only taxGroupId. May that be an issue?
 
We are not facing these issue with other customers from US. Only this customer in Belgium
 
Is there any specific limitation for creating Items through API for different region/country accounts (Example, an account from Europe/Belgium)?
Is there any specific configuration that needs to be made for different region/country accounts in order for Items to be created through API?
Is there any additional parameters required to be sent when creating Items in accounts from different regions/countries?
 
 
  • [URGENT] The field Tax Group Id of table Item contains a value X that cannot be found
    I'll try to clarify a bit what we are trying to achieve and what the problem is.
    We are trying to create an Item (outside of Dynamics) in Dynamics through the API.

    Before we even try to create an Item, we are first fetching the Tax Groups. We are doing so following this Dynamics docs
    https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/api-reference/v2.0/api/dynamics_taxgroup_get
     
    Request looks like this
     
    In the response we are getting the id, supposedly it's the id of the Tax Group
     
    We are then trying to create an Item, following this Dynamics docs, and passing fetched id as taxGroupId.
     
    Request body from the docs looks like this
     
    When we try to do that, using the id (as taxGroupId), we are getting an error:

    The field Tax Group Id of table Item contains a value ({A1272569-9819-ED11-90EB-6045BD880AA6}) that cannot be found in the related table (Tax Group). CorrelationId: d9eb19b7-ea02-4a05-816d-384bcefb94db

    And this is how our request body for creating Item through API looks like

    Can someone explain to me why this issue is occurring?

    Are we passing taxGroupId incorrectly?

    If yes, how should we then fetch the taxGroupId before trying to create an Item?

  • Suggested answer
    HVGEEL Profile Picture
    HVGEEL 286 on at
    [URGENT] The field Tax Group Id of table Item contains a value X that cannot be found
    Thank you for the very detailed explanation.
     
    The BE-perspective makes it confuting for the rest of the world... but hey, as a BE-based professional, I should be able to shed some light.
     
    You are confusing two fields:
     
    you are referring to the VAT Product Posting Group as the taxGroupId... which it isn't. But I do understand the confusion, the field essentially serves for TAX/VAT calculations.
    However though...the taxGroupID is a distinct, completely different field.
     
    Let me show you with a simple CRONUS screenshot:
     
    What you should see in the screenshot: it is perfectly possible to have an item with a valid VAT Prod. Posting Group and at the same time, have a rubbish-value for the TaxGroupId.
     
    I think, the answer lies in your localisation: is this a BE-localized BC, or is it a W1? Can you come back on that?
    Both will have VERY distinct behaviour in this context.
  • Suggested answer
    KasparsSemjonovs Profile Picture
    KasparsSemjonovs 4,011 Super User 2024 Season 2 on at
    [URGENT] The field Tax Group Id of table Item contains a value X that cannot be found
    You can try passing the TaxGroupCode when creating the item. The TaxGroupId is then filled in by system on the validation of this field. At least from user point of view - You cannot fill in this field manually. And you cannot fill it in, if the TaxGroupCode is empty.

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,759 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,468 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans