MscrmTools / MsCrmTools.UserSettingsUtility

XrmToolBox plugin to manage users personal settings in bulk
GNU General Public License v3.0
7 stars 11 forks source link

Simple (maybe crude) fix for the issue #17 #18

Closed Prospero100 closed 5 years ago

Prospero100 commented 7 years ago

I was seeing an issue (exception thrown) when updating lists of users. The exception complained that the user had no roles in CRM. I've modified the code to catch the error, which does the job, but is maybe a little crude. I couldn't understand why the lack of a role should cause an error when retieving the user settings for that user on line:

var records = detail.ServiceClient.OrganizationServiceProxy.RetrieveMultiple(new QueryByAttribute("usersettings")

A better fix would be to ensure this call does not fail for users with no roles assigned in CRM.

Anyway - the amended code worked for me, and allowed me to finish the job at hand. Updating 400 users to be in the right time zone :)

MscrmTools commented 7 years ago

Thank you for the submission. I will review it asap

MscrmTools commented 5 years ago

No need anymore