locked
Outlook client setting for mscrm 2011 copy for another user RRS feed

  • Question

  • Dear all;

    i am outlook client fro mscrm 2011 setting for particular user i want to copy that setting to all user how can i do it 

    Wednesday, May 21, 2014 11:47 AM

All replies

  • We have done something similar to apply settings to all Users in the Organization.  In the SDK if you look at the UserSettings Entity, you will see you can use RetrieveRequest, RetrieveMultipleRequest, and UpdateRequest.  Viewing the UserSettings Entity Metadata you will see a number of attributes available.

    So, what you could do is create a console application to Retreive the UserSettings associated with the 'source' SystemUser.  Then retrieve all other SystemUser 'target' entites and assign values from the source to target as appropriate.  Here is a snippet showing how to retrieve UserSettings for a specified SystemUser:

    private static UserSettings RetrieveUserSettings(IOrganizationService service, Guid userId)
            {
                QueryByAttribute query = new QueryByAttribute(UserSettings.EntityLogicalName);
                query.AddAttributeValue("systemuserid", userId);
                query.ColumnSet = new ColumnSet("offlinesyncinterval", "reportscripterrors", "synccontactcompany", "issendasallowed"); // Add Other Attributes as needed
    
                EntityCollection coll = service.RetrieveMultiple(query);
                if (coll.Entities.Count != 1)
                {
                    throw new Exception("Should have exactly one usersettyings associated");
                }
                return coll.Entities[0].ToEntity<UserSettings>();
            }

    And another retrieving all SystemUsers, then foreach record retrieving the UserSettings, setting an attribute then updating the entity:

     
    QueryExpression usersQuery = new QueryExpression(SystemUser.EntityLogicalName); 
    usersQuery.ColumnSet = new ColumnSet("fullname"); // Add Columns as needed
    
    EntityCollection allUsers = _orgService.RetrieveMultiple(usersQuery);
    
    foreach (SystemUser user in allUsers.Entities)
    {
        if (user.FullName == "SYSTEM")
        {
            // don't change built-in users
            continue;
        }
    
        bool requiresUpdate = false;
        UserSettings settings = RetrieveUserSettings(organziationService, user.Id);
    
        if (!settings.IsSendAsAllowed.HasValue ||
            (settings.IsSendAsAllowed.HasValue && settings.IsSendAsAllowed.Value == false))
        {
            settings.IsSendAsAllowed = true;
            requiresUpdate = true;
        }
    
        if (requiresUpdate)
        {
            organziationService.Update(settings);
        }
    }

    Hope this helps.

    Wednesday, May 21, 2014 10:51 PM
  • Hi 

    Thanks for reply what i meant that you do setting in outlook as well i am not talking about the email setting in the crm web i am talking about crm outlook client setting in outlook can i set it through GPO to all users

    Thursday, May 22, 2014 7:38 AM
  • Hi 

    Thanks for reply what i meant that you do setting in outlook as well i am not talking about the email setting in the crm web i am talking about crm outlook client setting in outlook can i set it through GPO to all users


    Can you please provide an example of the settings in outlook you are referencing?
    Thursday, May 22, 2014 1:57 PM
  • If you are interested in changing a user's personal options, you can use this tool to bulk change them.

    http://crm2011usersettings.codeplex.com/wikipage?title=CRM2011%20User%20Settings%20Utility%20%202.0

    If you are looking for something different this probably won't help./

    Friday, May 23, 2014 6:44 PM
  • Hi ;

    below is the image regarding the filter setting for one of the user in outlook client for mscrm i am sorry that is in Danish but it is just making a filter in active in the outlook setting 

    Monday, May 26, 2014 9:14 AM