TaxClass Id always null

Hi I am migrating our integration platform to Litium 7, and there is a change of how the Tax is handled in Litium 7.
So I’m about to change so the tax will be on the baseProduct instead of the variant. But when i’m save a new TaxGroup from BackOffice, the Id in database is always null. I need a unique identifier to select the taxGroup in my integration, and i assume the Id would be the name of the taxGroup on standard language, which i have seen in several tables.
Should the Id column in Globalizations.TaxClass1 always be null or is it a bug?

Litium version: 7

This is by design, if you need to do migrating then you can set the Id in the DB and use it for migration.

So even if i save a new TaxGroup the id-column should always be null?

It will always be null since you don’t set it anymore on the UI.

But you can always get it by the Culture name that you gave it.

Yeah i know but i could use that, but it feels a bit fragile to get a TaxGroup by a name field.
I would like to fetch the TaxGroup for example by an Id that could be Books. And the TaxGroup could be named like Books Tax on English and named Böcker moms on Swedish. I think i have to force the user to send CountryId and the Vatpercentage they would like to have on that product and by those fields try to find a TaxGroup…

Yes I understand and I also sent suggestion to product team to put the Id back but it is up to them to decide to implement it back.

1 Like

Yeah that would be nice. Worth mention is that there is a method that seems to be implemented just for this reason.

public abstract TaxClass Get([NotNull] string id)
1 Like

If you in your integration also creating the tax class you have the possibility to set the ´Id` and then you later can fetch the tax class by that value.