Our monthly Virtual Happy Hour is happening this week, Fri Feb 23!

Try our conversational search powered by Generative AI!

Storing custom data


We would like to achieve this functionality: for each order we want to associate a store and a time slot in which the product can be collected.

We also like to manage the stores and the slots available for each store in the cms (for example adding the slots to a store like you add users to a group in windows)

What would be the best way to achieve this? Storing objects in Business Foundation or dynamic data storage, or is it better to have a custom database and admin tool?

Examples or pointers to the right direction are welcome :-)


Jun 02, 2011 19:01
Bode0077 - Jan 02, 2022 11:21
How can i activate website an collect data's??

Ok we found that it is possible to store the data with custom entities using Business Foundation.

The only problem is that a many to many relationship does not seem to work as we would like it to work.
A "store" can have many "time slots" (in which orders can be collected) and a "time slot" can be used in many "stores".

So we would like to show an editable list of slots on the edit store Form. It could look like this:

What would be the best way to achieve this?

Jun 03, 2011 16:38
How can i activate website an collect data's??
Jan 02, 2022 11:22

You'll want to extend the PurchaseOrder to persist a 'store' and 'collection date': https://world.optimizely.com/documentation/developer-guides/commerce/orders/Extending-order-classes/

For managing a list of stores / available time slots, you could create a custom table in the episerver commerce database or you could store them as a cms page / blocks. Depends on how you want to surface the data with your other features.

Jan 27, 2022 7:56

Hello @Cedric, I would also use business foundation for creating stores. Either you can create a new entity or use existing entity Organization as store. Either way should work. However, for time slots you can use two different ways, create a custom entity as you have already created or use multi select MetaEnums. Using mutli select MetaEnums you can populate the meta enums as a multi select checkbox on your stores easily and store them accordingly. Or else create custom meta fields on your store to show all our custom entity (time slots) as multi select checkbox and while storing the data in stores, store their ids instead of creating reference between them. If you avoid using reference, then you will be able to avoid the many to many relationship problem.

Good luck!

~ Sujit

Feb 06, 2022 19:13
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.