Dynamics 365 Check User has Send As Privilege programatically
Business Requirement :- Many a times in our project we get the requirement to check if logged user has Send As privilege allowed in his personal setting programatically. We can use below code snippet to check the logged in user personal settings from plugin code. public bool CheckUserSendAsPrivilege(IOrganizationService service, Guid userGuid) { try { if (userGuid != Guid.Empty) { QueryExpression queryUserSettings = new QueryExpression(UserSettings.EntityLogicalName); queryUserSettings.NoLock = true; queryUserSettings.Criteria.AddCondition(UserSettings.systemus...