locked
Long time to run admin activities on a new User RRS feed

  • Question

  • After creating a new User, it takes a long time for the User to show up under the Administrative section in order to re-assign them to a Team and assign Security Roles.  Is there a way to "push" them quicker.

    Sometimes they show up immediately.....other times I wait for over an hour??????

    Friday, April 4, 2014 6:01 PM

All replies

  • Hi,

    you can create a tools to modify it. I create a console Application. For example, you can use this code to assign security role

     public void AssignSecurityRole(Guid prmUserId, Guid prmSecurityRoleId, IOrganizationService prmCrmWebService)
        {
            // Create new Associate Request object for creating a N:N link between User and Security
            AssociateRequest wod_AssosiateRequest = new AssociateRequest();

            // Create related entity reference object for associating relationship
            // In our case we will pass (SystemUser) record reference
               
            wod_AssosiateRequest.RelatedEntities = new EntityReferenceCollection();
            wod_AssosiateRequest.RelatedEntities.Add(new EntityReference("systemuser", prmUserId));

            // Create new Relationship object for System User & Security Role entity schema and assigning it
            // to request relationship property
               
            wod_AssosiateRequest.Relationship = new Relationship("systemuserroles_association");

            // Create target entity reference object for associating relationship
            wod_AssosiateRequest.Target = new EntityReference("role", prmSecurityRoleId);

            // Passing AssosiateRequest object to Crm Service Execute method for assigning Security Role to User
            prmCrmWebService.Execute(wod_AssosiateRequest);
        }

    in this case, when I need to create a new user, I use my console app..

    What do you think?

    Bye

    Alessandro


    Alessandro Graps

    Monday, April 7, 2014 7:53 AM