How to use a reference selector

0
Hi, I'm completely new to mendix and using it for a study project. I'm currently stuck on how to use a reference selector. I've tried al the available tutorials but i just don't get the solution out of it. Basicly this is what i need to accomplish. I have an customer and multiple statuses. I want an customer to be able to create a account for hisself with all his information (in the domain represented by a customer entity with all the necessary information fields) and when the account is created i want a employee to get the account of this new customer in a list with the status added to the account info (this is where the reference comes in) and be able to change the status via a button with a microflow. I know how the button and microflow's work, i just don't get the reference set up. If someone could help me with this problem it would be much appreciated. I'm completely stuck on the subject. Kind regards, Peter Schakel
asked
1 answers
0

Peter

There are a number of different ways to accomplish this. Simplest way is to put it on a new/edit Page (using a reference selector), and then when the page is saved, your reference will be updated. Using this method, your Employee would see a list of Customers in a Datagrid. Using an edit button pointing to the page I mentioned previously, the Employee could change the reference, save the customer and you are done.

To accomplish this via a microflow is do-able, just not as quickly and easily. Is there a reason you would like to use a microflow? You would build your microflow to accept a Customer object as a parameter and then change the Status association. You could either change the status to a certain status (which you would retrieve in a microflow action with an XPath constraint to get the correct status object), or, if your statuses have a sequence attribute, you could get the next status in sequence using a retrieve action. In either case, the way you change a reference in a microflow is via a Change Object action. In that action, you would select the reference you want to change and specify the object to change it to.

Hope that helps,

Mike

answered