Copying lists

0
I don't have the right answer yet. I have a predefined list of products. Each customer will have his own 'copy' of this list and can manage this list for his own purpose. At this moment if one customer changes the list, the list is changed for all other customers to. How do I make a list of products where changes made by the customer to the list only apply to that customer? If possible please be explicit about the solution (microflow steps etc). Thanks in advance.
asked
3 answers
0

Your reference is wrong, it should be a multiple to multiple association. Because each customer can have 1 to many products in it's list while each product can be a member of multiple customer lists.

Regards,

Ronald

answered
0

The key lies in creating the correct associations in your data model. Every product should be associated to a customer. Be sure to show the product over this association so a customer only sees his own products.

This is pretty basic functionality for which you won't need a microflow. If my explanation is not clear, I would check out the online course material. https://gettingstarted.mendixcloud.com/index3.html

answered
0

The solution is to model your data differently. See, for example this domain model:

sample domain model

The owner of the application manages the TemplateProducts, these are the base version of your products.

When you create a new customer, you initilize a subset of the TemplateProducts as CustomizedProduct. You do this by creating a CustomizedProduct object for each TemplateProduct in the subset.

You then give the customer control over his CustomizedProducts.

Now, when the customer changes a CustomizedProduct, only his own product changes.

answered