Breaking news from around the world
Get the Bing + MSN extension
Now Available in Community - MBAS 2019 Presentation Videos
Catch the most popular sessions on demand and learn how Dynamics 365, Power BI, PowerApps, Microsoft Flow, and Excel are powering major transformations around the globe. | View Gallery
2019 release wave 2 Discover the latest updates to Dynamics 365Release overview guides and videos Release Plan | Early Access Availability
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Talent TechTalks | Upcoming TechTalks
In Dynamics 365 CRM, user can modify his personal setting through Set Personal Options by clicking Gear Symbol present in Left side of form, after login into CRM.
But most of the time user is unaware about the options that are available in Personal Setting. For Example, Allow other Microsoft Dynamics 365 user to send email on your behalf have false value by default and user forgets to set value as True. In this scenario, administrator user is unable to send an email on behalf of that user.
So in this blog, we will focus on how to update user personal setting, i.e. set default value of Allow other Microsoft Dynamics 365 user to send email on your behalf programmatically (without login into CRM).
Recently, we came across a scenario where an administrator user wants to send an email on behalf of some other user. In this case, if by default Allow other Microsoft Dynamics 365 user to send email on your behalf is not true then it will throw an error message as User Does not have permission to send Email.
To avoid this situation, we need to programmatically set Allow other Microsoft Dynamics 365 user to send email on your behalf as true in User Personal Setting.
To achieve this, we can either write plugin or assembly for the same.
We accomplished the same by using workflow assembly, because as per our functionality we required On Demand workflow. But you can also achieve the same by using plugin with Images i.e. Post Image.
Given below are the steps to set Allow other Microsoft Dynamics 365 user to send email on your behalf as True programmatically.
Step 1: Create workflow assembly.
Code Snipped to update user form Assembly and plugin
Entity userSetting = new Entity(“usersettings”);
//Guid Of the user record
userSetting.Id = userId;
//Attribute to set value of “Allow other Microsoft Dynamics 365 user to send email on your behalf”
userSetting[“issendasallowed”] = true;
//Update the Record
Step 2: Register Assembly.
Step 3: Create On Demand workflow which will also trigger on change of Outgoing Email Delivery Method field and call registered assembly in workflow.
We can set default value of Allow other Microsoft Dynamics 365 user to send email on your behalf as True programmatically by using workflow or plugin.
Business Applications communities