how to default select using reference selector

0
using the mendix account_new page, i have a field called “company”. My goal is for dev admins to be able to create users and assign them to a specific company. but if a customer admin adds a user, i want the company field to default to the same company as the customer admin. (so they cannot add a user for another company) i will hide this field so it is unable to be edited by customer admins on dev admins does anyone have an idea of how i can have the company auto-select based on current user’s company?      for company field:  visibility of the field is based on the role: 
asked
4 answers
1

No I don't mind off course.

The first thing I want to tell you is that changing Marketplace modules is not a good idea. Those are downloaded from the Marketplace and if you ever need to update those, you might lose the changes you've made.

This means that using the overview page from the Marketplace might not be a good idea as well. I would recommend moving/duplicating the overview page as well just to be sure.

So if you want to change the default, consider using a different module.

1. Right click the new button on the overview page
2. Edit on click action
3. Call a microflow
4. Create a new microflow in a different module
5. Open the microflow
6. Retrieve the company you want to associate to the new user.
(depending on the reference between the user and company you need to change the object you're referring to)
7. I've made a screenshot on how the microflow should look like.

 

 

answered
7

Kindly refer the below image.

 

answered
0

You need to create a microflow for the new button. In this microflow you will create the a new user object and set the association to the company you want as soon the microflow is called.

This way the association is already set when the page is opened.

answered
0

Hi,

On the button, call microflow,Retrive the company and set the association Customer_Account to the retrived company object. By this way, company will get autopopulated when user clicks on the New button

Hope it helps!!!

answered