Wednesday 26 September 2012

Update personal setting for all users

I am working on a project where we are suppose to send an email when ownership of a record is changed, and also on some record when some data is updated but due that we had some information which logged in user has no visibility due to security role, but we want to inform them or update data as a result of some changes done by logged in user.

To achieve there are few plugin written which are running as service account, everything seem working fine except when user's setting is to user email router to send email, in this case the logged in user is in the from however the plugin which is executing is running under service account then user gets plugin exception that he needs to update "Allow other users to send email on his/her behalf", if user sets this option by going to file->option->email tab and selects this check box than plugin executes fine.

however this needs to be done for lots of user on client site, and there is not OOB option which allows system admin to update personal setting for each user.

Solution is to write code and retrieve usersettings record and then update IsSendAsAllowed email for the required users:

Entity Name: UserSettings

Attribute Name: IsSendAsAllowed

No comments:

Post a Comment