I am trying to import employee data from excel file using excel import and mx model reflection. The employee data is getting added in the database but account is not getting created for the individual employee? What should I do as to get the employee accounts created in bulk while importing the data? Please help.
Always associate the process data entity of Employee, customer, … using a 1-1 association to System.Account.
Because the account is the passport of the user to authenticate itself when accessing the application. The moment you start inheriting, the process data = the passport and thus in ALL usages of the process object, the account(User)/Passport data is carried with it. In short; you don't want this related to a secure app.
Back to the original question:
Create a single entity with all attributes matching the excel columns
Create an employee entity with 1-1 association to System.Account
Create an import microflow, which imports all data from excel to this import entity
Create a second microflow which maps the imported data from import entity to Employee & account
Don't forget to set the association between the employee and account!
After mapping delete the list of import entity
This microflow can be a sub-microflow in the same microflow as the Import, so that there isn't a second user action required
Rene van Hofwegen
Well, you can do it in following ways.
Extend Employee and make it specialized object of Account. Account is a specialized entity of System.User. Fill the attributes of account and User entity where required.
Associate Employee with Account. When you create Employee, also create Account and fill the details.