I'm running into an issue with adding a tag on an item of type "AdditionalTax".
Code: Select all
IEnumerable<dynamic> SpTaxes = DOrder.Properties[0].Taxes;
dynamic ac = Order.CreateNew("AdditionalTax");
ac.Description = "A Tax";
((IOrderItem)ac).SetTag("TaxTag", "AdditionalTax");
((IList)SpTaxes).Add(ac);
The problem comes when I try to delete the additional tax. If I try removing it through the API:
Code: Select all
((IList)SpTaxes).Remove(theTax);
Taxes without manually added tags can be deleted just fine, both UI and API.
Am I doing something wrong? Note that I've tried saving the order after adding the tag, but it still throws this error when removing.