Hi
Im trying to use CustomData in Inventory, It forces me to impl IReadOnly.
I tried both IReadOnly
and ObjectBase<T>
I think i impl those as expected but when trying to delete the inventory both in backoffice or via code I get Invocation Error, looking deeper it seams i cannot delete inventory because CustomData is readonly.
I tried with MakeWritableClone() on Inventory obj but that did not help. Then i stumble upon this: https://docs.litium.com/support/bugs/bug_details?id=46318 and CustomData object
Seems like a similar problem buth with pricelists. Currently I use the workaround in bug details by implementing IReadOnly interface and pretty much do:
bool IReadOnly.IsReadOnly => false;
object IReadOnly.MakeWritableClone() => this.MemberwiseClone();
And so far i can delete the created items in BO, or via Code without issues.
I have tried by using IReadOnly
or ObjectBase<T>
But the same issue appears when not using the workarround mentiond in the bug details.
In the end;
- is this workarround dangerous in any way?
- Is the fix for Pricelist also a fix for Inventory?
- Is this working with ObjectBase class but I implemented it incorrectly?
Thanks in advance
Using: Litium 7.2.3