This project is read-only.

unable to create users with custom roles. Source code looks for RoleTemplateID which is NULL many times


Hello Koushik,
Summarizing the discussion we had: Logging the same in Code Plex Issue tracker
Purpose: To Just Create 200 users with UIIAgent [custom role] for perf testing purpose.
Note: this tool wasn’t used for full fledges performance testing.
Tool used: DB populator in CRM perf tool kit
  1. Unable to create users with custom Roles with the DBpopulator exe provided.
  2. Source Code DB Populator tool mandates the existence of roletemplateID which is currently NULL for us. Hence even afte modifying the source code we are unable to create users with required role.
  3. Created 200 users in AD first
  4. Ran the EunPopulation1.cmd.
    a. removed all entries related to customization/ reports etc…
    b. only had userpopulate.xml entry
  5. By default users were created in System Admin role
  6. Restored back to clean DB and modified the User Populate.xml that was created to have the user role as UIIAgent.
  7. Ran this command again : DbPopulator\dbPopulator.exe UserPopulate.xml
  8. By default users are created with System administrator as role.
  9. Custom roles are not supported by the DBpopulator.exe currently. Source Code has been scritped to take only the System roles.
  10. Even when modified the code – custom roles with roletemplateID alone is performing properly …with NULL it errors out.
  11. If we try to add only roles to existing users – the DB populator tries create it first and then update role… and hence failing.
    a. Cons: Everytime user needs to restore to a clean DB and populate users that creation of users happen first and then updation of roles.
    Source code modifications and solution tried :
    Was modified to accommodate the UIIAgent Role. But since the RoleTemplateID is NULL it is unable to create users with UIIAgent role.
    It throws Objectreference not set to instance of object.
    Attached the dbpopulator.cs.
    Asks :
  12. Request to provide a solution where we can create any number of users to any role –not only to system roles having a roletemplateID but also roles that hass roletemplateID as NULL.
  13. Also provide a option to add more roles to the already created users.
  14. Deletion script also needs to be available so that everytime we need not keep restoring to clean DB versions.
    Thank you

file attachments