<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
><channel><title>user settings | Taha Syed | Salesforce</title>
<atom:link href="https://www.syedtaha.com/tag/user-settings/feed/" rel="self" type="application/rss+xml" /><link>https://www.syedtaha.com</link>
<description>Taha Syed &#124; Sales to Salesforce &#124; Dissecting and Defining the Rationale..</description>
<lastBuildDate>Tue, 21 Aug 2018 13:47:16 +0000</lastBuildDate>
<language>en-US</language>
<sy:updatePeriod>
hourly	</sy:updatePeriod>
<sy:updateFrequency>
1	</sy:updateFrequency>
<generator>https://wordpress.org/?v=6.9.4</generator>
<item><title>Changing Default Event Reminders in Users Settings For Multiple Users</title><link>https://www.syedtaha.com/salesforce-admin-hacks/changing-default-event-reminders-in-users-settings-for-multiple-users/983/</link>
<comments>https://www.syedtaha.com/salesforce-admin-hacks/changing-default-event-reminders-in-users-settings-for-multiple-users/983/#respond</comments>
<dc:creator><![CDATA[Taha Syed]]></dc:creator>
<pubDate>Thu, 16 Aug 2018 15:01:49 +0000</pubDate>
<category><![CDATA[Salesforce Admin Hacks]]></category>
<category><![CDATA[admin hacks]]></category>
<category><![CDATA[apex code]]></category>
<category><![CDATA[Set default event reminders to]]></category>
<category><![CDATA[user settings]]></category>
<guid
isPermaLink="false">http://www.syedtaha.com/?p=983</guid><description><![CDATA[<p>Updating the &#8220;Set default event reminders to&#8221; or any other User Setting for multiple Users. &#160; Scenario: While creating an Event or Task in Salesforce, the “Reminder” Checkbox is checked by default for all users. The reminders have piled up and making it difficult to keep track of the important events and tasks. The Sales [&#8230;]</p>
The post <a
href="https://www.syedtaha.com/salesforce-admin-hacks/changing-default-event-reminders-in-users-settings-for-multiple-users/983/">Changing Default Event Reminders in Users Settings For Multiple Users</a> first appeared on <a
href="https://www.syedtaha.com">Taha Syed | Salesforce</a>.]]></description>
<content:encoded><![CDATA[<h1>Updating the &#8220;Set default event reminders to&#8221; or any other User Setting for multiple Users.</h1><p>&nbsp;</p><h2>Scenario:</h2><p>While creating an Event or Task in Salesforce, the “Reminder” Checkbox is checked by default for all users. The reminders have piled up and making it difficult to keep track of the important events and tasks. The Sales team wants you to uncheck the “Set default event reminders to” Checkbox for all users.</p><p>This setting is found in:<br
/>
My Settings &gt;&gt; Calendar and Reminders &gt;&gt; Activity Reminders &gt;&gt; ‘Set default event reminders to’</p><figure
id="attachment_984" aria-describedby="caption-attachment-984" style="width: 455px" class="wp-caption alignnone"><img
fetchpriority="high" decoding="async" class="wp-image-984 size-full" src="http://www.syedtaha.com/wp-content/uploads/2018/08/Activity-Reminders-Salesforce.png" alt="Activity Reminders Salesforce" width="455" height="381" srcset="https://www.syedtaha.com/wp-content/uploads/2018/08/Activity-Reminders-Salesforce.png 455w, https://www.syedtaha.com/wp-content/uploads/2018/08/Activity-Reminders-Salesforce-300x251.png 300w, https://www.syedtaha.com/wp-content/uploads/2018/08/Activity-Reminders-Salesforce-70x60.png 70w" sizes="(max-width: 455px) 100vw, 455px" /><figcaption
id="caption-attachment-984" class="wp-caption-text">Activity Reminders Salesforce</figcaption></figure><figure
id="attachment_985" aria-describedby="caption-attachment-985" style="width: 866px" class="wp-caption alignnone"><img
decoding="async" class="wp-image-985 size-full" src="http://www.syedtaha.com/wp-content/uploads/2018/08/Activity-Reminder-Settings-Salesforce.png" alt="Activity Reminder Settings Salesforce" width="866" height="601" srcset="https://www.syedtaha.com/wp-content/uploads/2018/08/Activity-Reminder-Settings-Salesforce.png 866w, https://www.syedtaha.com/wp-content/uploads/2018/08/Activity-Reminder-Settings-Salesforce-300x208.png 300w, https://www.syedtaha.com/wp-content/uploads/2018/08/Activity-Reminder-Settings-Salesforce-768x533.png 768w" sizes="(max-width: 866px) 100vw, 866px" /><figcaption
id="caption-attachment-985" class="wp-caption-text">Activity Reminder Settings Salesforce</figcaption></figure><p>&nbsp;</p><h2>Solution:</h2><p>This can be achieved by updating the User Object using Apex Code or the Data Loader</p><h2><span
style="text-decoration: underline;">Executing Apex Code Method</span></h2><p>A simple Apex code snipped can help us in unchecking “Set default event reminders to” Checkbox for multiple users. We will be using the Developer Console’s Execute Anonymous Window to run the Apex code.</p><p>To “Set default event reminders to” Checkbox to Unchecked, our Apex code will perform the following steps:</p><ol><li>Step 1: Create a List to hold Users that need an update to their settings.</li><li>Step 2: Find all Active Users whose ‘Activity Reminder Checkbox’ is ‘Checked’ and add them to the above list.</li><li>Step 3: Iterate through each user in the above list and Uncheck the Activity Reminder Checkbox</li><li>Step 4: Create a final list to update to reduce the DML statements</li></ol><div
class="tab_widget wp_shortcodes_tabs"><ul
class="wps_tabs"><li><a
href="#" data-tab="tab-0-step-1">Step 1</a></li><li><a
href="#" data-tab="tab-1-step-2">Step 2</a></li><li><a
href="#" data-tab="tab-2-step-3">Step 3</a></li><li><a
href="#" data-tab="tab-3-step-4">Step 4</a></li></ul><div
class="tab_container"><div
id="tab-0-step-1" class="tab_content clearfix"></p><p>We will create a List of Users</p><pre class="lang:default decode:true">// Create a list of Users whose setting needs to be changed
List &lt;User&gt; userList = New List &lt;User&gt;();</pre><p>&nbsp;</p><p></div><div
id="tab-1-step-2" class="tab_content clearfix"></p><p>We then write an SOQL to fetch all the users whose settings have to be changed.</p><pre class="lang:default decode:true ">//SOQL to add all users to the above list
userList = [
    SELECT Id, UserPreferencesEventRemindersCheckboxDefault
    FROM User
    WHERE UserPreferencesEventRemindersCheckboxDefault = True AND ISACTIVE = True];</pre><p>&nbsp;</p><p></div><div
id="tab-2-step-3" class="tab_content clearfix"></p><p>In this step, we will iterate through each user and change the required settings. Refer to the developer guide to know more about the settings. We will also add the users to the final list to be updated.</p><pre class="lang:default decode:true ">// Iterate through each user and update the setting
For (User u:userList) {
    u.UserPreferencesEventRemindersCheckboxDefault = False;
    userList2update.add(u);  //Add user to the final list to update
}</pre><p>&nbsp;</p><p></div><div
id="tab-3-step-4" class="tab_content clearfix"></p><p>As a best practice to reduce the DML statements, we will add the User to another list named ‘userList2Update’. Then, update all the Users in this list together using DML.</p><pre class="lang:default decode:true ">//Create a final list of Users to perform DML
List &lt;User&gt; userList2Update = New List &lt;User&gt;();


update userList2Update;  //Update the final List</pre><p>&nbsp;</p><p></div></div></div><div
class="clear"></div><p>Here&#8217;s the complete code to uncheck the &#8220;Set Default Reminders to&#8221; or any other user setting in Salesforce.</p><pre class="lang:default decode:true">//Create a final list of Users to perform DML
List &lt;User&gt; userList2Update = New List &lt;User&gt;();
// Create a list of Users whose setting needs to be changed
List &lt;User&gt; userList = New List &lt;User&gt;();

//SOQL to add all users to the above list
userList = [
    SELECT Id, UserPreferencesEventRemindersCheckboxDefault
    FROM User
    WHERE UserPreferencesEventRemindersCheckboxDefault = True AND ISACTIVE = True];

// Iterate through each user and update the setting
For (User u:userList) {
    u.UserPreferencesEventRemindersCheckboxDefault = False;
    userList2update.add(u);  //Add user to the final list to update
}

update userList2Update;  //Update the final List</pre><p>&nbsp;</p><p>Now that we have the Apex Code, lets head to the Developer Console and execute this code from the Anonymous Window (Ctrl + E)</p><p>&nbsp;</p><p>For the Data Loader method, please visit the Salesforce Help Article<br
/>
<a
href="https://help.salesforce.com/articleView?id=000004609&amp;language=en_US&amp;type=1" target="_blank" rel="noopener">https://help.salesforce.com/articleView?id=000004609&amp;language=en_US&amp;type=1</a></p><p>For a complete list of fields on the User Object, please visit the Developer Guide<br
/>
<a
href="https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_user.htm" target="_blank" rel="noopener">https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_user.htm</a></p>The post <a
href="https://www.syedtaha.com/salesforce-admin-hacks/changing-default-event-reminders-in-users-settings-for-multiple-users/983/">Changing Default Event Reminders in Users Settings For Multiple Users</a> first appeared on <a
href="https://www.syedtaha.com">Taha Syed | Salesforce</a>.]]></content:encoded>
<wfw:commentRss>https://www.syedtaha.com/salesforce-admin-hacks/changing-default-event-reminders-in-users-settings-for-multiple-users/983/feed/</wfw:commentRss>
<slash:comments>0</slash:comments>
</item>
</channel>
</rss>