Access denied when creating new user in Account_New page

0
Hello Everyone, I was working on an app, where in the domain model I generalized the entity (app_user) with System.user and also created an association between app_user and AccountPassworData . For registration purpose in the registration page I add two data views and set the outer entity path to AccountPassworData and the inner one is set to app_user.  But after trying to run it locally the page Account_New is not giving access to enter any data to that page.   I’ve attached the screenshot of my domain model and the register page. Need some help here. NOTE: Mendix Version 8.16.0 Thank You  
asked
2 answers
1

I have two answers for you;

First answer
When opening the page AddAccount you need to pass a AccountPasswordData object which does have a association to a App_User Object. Also the user must have access rights to read/write the attributes.

As far as I can deduct I assume you

  1. created a AccountPasswordData object, but not a App_User object and associated that to the AccountPasswordData object.

    Or
     
  2. the user doesn’t have write access <= which is most likely my second answer is how to solve this

 

Second answer
You mention registration of users “ For registration purpose in the registration page...” 

Gives me the impression that you want the option for anonymous users to register them self and creating an account. See my answer on this post for the way how to do this: https://forum.mendix.com/link/questions/104377 

answered
0

He Gayatree,

Just a quick question to check if I understand: before opening the page, did you create the Persistent the app-user and the NP AccountPasswordData and stored the association between the two? If not, the page doesn’t have an object to edit …

One thing about the model: Mendix advises to use UpperCamelCase for your entity names:
”3.2 Domain Model
3.2.1 Entity Names
Most of the time, an entity reflects a real-world object that people can relate to. Therefore, the entity name should also reflect that object and identify its purpose. There are sometimes project-specific exceptions that lead to creating other types of entity, but that is up to you. The name of an entity is singular since an object is a single instance of the entity. A good example is using Customer and not Customers. Furthermore, we advise avoiding abbreviations, underscores, mathematical characters or any other special characters in the names of entities. Entity names also use UpperCamelCase, for example, HousekeepingRecord or LogEntry.”

You can find the best practices here: https://docs.mendix.com/howto/general/dev-best-practices

answered