Also have a look at ‘Base application’: baseapplication-sandbox.mxapps.io/. Using that module as your starter app will save you days or weeks development and save you from a lot of pitfalls and you will be working on your app instead of on basic functions that have been created millions of times already.
Hi @Lennaert
Thanks for your quick reply.
My NewUser Entity has the following attributes:
At the moment, in my Registration microflow I do the following:
Sorry for the long hassle, I'm just trying to figure out how these things work in Mendix properly without getting confused on the amount of options to do the same thing.
Cheers!
Hello Nikola,
user roles are created automatically in project once your app is running so you will need to retrieve it from the database and make relationship association between required entities .mendix provides a useful symbol XPATH that you can use to filter. [id = ‘[%UserRole_Administration%]’] use this XPATH expression.
With regards to your first question, yes, that is possible. The approach might be a bit unfamiliar for the average developer but once I explain it, it will make sense.
User roles are objects in your database of type UserRole. They are created automatically under the hood once your app is deployed for the first time and every time you change or add user roles. To assign a user role is to assign the UserRole object to the user. So all you need to do is retrieve it from the database and make the appropriate association. But how do I get my User user role you might ask? There Mendix provides a useful symbol in XPath that you can use to filter. You would use the XPath expression below.
The answer to your second question is no, but you have authentication widgets in your Page toolbox that will work without a data view.