Dear,
I have 2 custom entities in the CDS:
- WarehouseLocation
- ID
- CanHoldMoreThanOneItem (YES/NO, Default NO)
- Items (List of items)
- Item
- ID
- CurrentLocation
with a one to many relation so that one item can have zero or one location and one location can have zero, one or many items.
How can I make a business rule that makes it impossible to add an item to a location when WarehouseLocation.CanHoldMoreThanOneItem == NO and COUNT(WarehouseLocation.Items) >= 1 ?
Thanks,
Koen