Answers.Body: <p>The <a href="https://github.com/davidjosephhayes/CiviCRM-Default-Dashlets" rel="nofollow">DefaultDashlets</a> CiviCRM extension creates a settings page that allows administrators to define the active dashlets for new users based on group membership. </p>
  
  <p>Keep in mind it was born some hours ago as part of a CiviCRM developer training exercise. You rock <a href="https://github.com/davidjosephhayes" rel="nofollow">David Hayes</a>!</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-04-22T04:10:25.650Z
Answers.LastActivityDate: 2015-04-22T04:10:25.650Z
Answers.UserDisplayName: LunkRat
Answers.Body: <p>You don't need to use SQL!  There is an API and a hook for this, assuming you're on Civi 4.4 or higher.</p>
  
  <p>Check out the <a href="http://wiki.civicrm.org/confluence/display/CRMDOC/API+changes#APIchanges-4.4.?:DashboardContactAPI--Enabledeveloperstoassigndashletstothedashboardforparticularusers" rel="nofollow">DashboardContact API</a>, especially if you're working with contacts that have already been created.</p>
  
  <p>If you're mostly concerned about new users, I'd recommend exploring <a href="http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_dashboard_defaults" rel="nofollow">hook_civicrm_dashboard_defaults</a>.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-03-26T02:46:11.487Z
Answers.Text: Thank you @Jon G, that's better than a SQL query. I am going to look into creating an extension with the API functions you mention.
Answers.UserDisplayName: LunkRat
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-03-26T02:23:03.530Z
Answers.LastActivityDate: 2015-03-26T02:23:03.530Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.Body: <p>I'm not aware of a front-end way to set a default, but you can use a SQL query to copy the dashboard setup from your "template" contact to new users as you create them. Below is an example:</p>
  
  <pre><code>insert into civicrm_dashboard_contact (
      dashboard_id,
      contact_id,
      column_no,
      is_minimized,
      is_fullscreen,
      is_active,
      weight,
      content,
      created_date)
  select
      dashboard_id,
      35, -- replace with new contact id
      column_no,
      is_minimized,
      is_fullscreen,
      is_active,
      weight,
      content,
      NOW()
  from
      civicrm_dashboard_contact 
  where 
      contact_id = 1 -- replace with contact id whose dashboard you want to copy
  ;
  </code></pre>
  
  <p>If you use a certain contact type/group/tag to define back office users, you can join to the appropriate table and do it all at once rather than one contact at a time.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-03-25T15:21:30.700Z
Answers.Text: Thanks @Nicholai, this is not at all what I wanted to hear, but I am very grateful that you shared this query!
Answers.UserDisplayName: LunkRat
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-03-25T15:44:37.227Z
Answers.Text: I guess you could create an extension that do what Nicholai propose automatically when a new contact is created using hook_civicrm_post.
Answers.UserDisplayName: samuelsov
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-03-25T15:49:03.147Z
Answers.Text: @samuelsov creating an extension is a great idea! Thanks.
Answers.UserDisplayName: LunkRat
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-03-25T15:05:09.480Z
Answers.LastActivityDate: 2015-04-14T15:52:15.603Z
Answers.LastEditDate: 2015-04-14T15:52:15.603Z
Answers.UserDisplayName: Nicholai
Body: <p>Can I create a default dashboard setup (active dashlets and arrangement) for all users?</p>
  
  <p>This would greatly improve the usability of the Dashboard, since the dashlets relevant to the use-case of the organization could be configured by an admin and users would see relevant data on their home screen instead of "CiviCRM News" or just this:</p>
  
  <blockquote>
    <p>Welcome to your Home Dashboard
    Your dashboard provides a one-screen view of the data that's most
    important to you. Graphical or tabular data is pulled from the reports
    you select, and is displayed in 'dashlets' (sections of the
    dashboard).</p>
  </blockquote>
  
Tags: <dashboard><ux><default-settings>
Title: How can I set default active dashlets for all users globally?
ThreadText: # How can I set default active dashlets for all users globally?
  
  (Asked by: username_0 on 2015-03-25)
  
  Can I create a default dashboard setup (active dashlets and arrangement) for all users?
  
  This would greatly improve the usability of the Dashboard, since the dashlets relevant to the use-case of the organization could be configured by an admin and users would see relevant data on their home screen instead of "CiviCRM News" or just this:
  
  > Welcome to your Home Dashboard
  > Your dashboard provides a one-screen view of the data that's most
  > important to you. Graphical or tabular data is pulled from the reports
  > you select, and is displayed in 'dashlets' (sections of the
  > dashboard).
  
  **Tags:** dashboard, ux, default-settings
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_0 on 2015-04-22. Score: 4 | Accepted answer
  
  The [DefaultDashlets](https://github.com/davidjosephhayes/CiviCRM-Default-Dashlets) CiviCRM extension creates a settings page that allows administrators to define the active dashlets for new users based on group membership.
  
  Keep in mind it was born some hours ago as part of a CiviCRM developer training exercise. You rock [David Hayes](https://github.com/davidjosephhayes)!
  
  
  ---
  
  ### Answer by username_1 on 2015-03-26. Score: 3
  
  You don't need to use SQL! There is an API and a hook for this, assuming you're on Civi 4.4 or higher.
  
  Check out the [DashboardContact API](http://wiki.civicrm.org/confluence/display/CRMDOC/API+changes#APIchanges-4.4.?:DashboardContactAPI--Enabledeveloperstoassigndashletstothedashboardforparticularusers), especially if you're working with contacts that have already been created.
  
  If you're mostly concerned about new users, I'd recommend exploring [hook\_civicrm\_dashboard\_defaults](http://wiki.civicrm.org/confluence/display/CRMDOC/hook_civicrm_dashboard_defaults).
  
  > **Comments:**
  > **username_0**: Thank you @Jon G, that's better than a SQL query. I am going to look into creating an extension with the API functions you mention.  
  
  ---
  
  ### Answer by username_2 on 2015-03-25. Score: 1
  
  I'm not aware of a front-end way to set a default, but you can use a SQL query to copy the dashboard setup from your "template" contact to new users as you create them. Below is an example:
  insert into civicrm_dashboard_contact (
      dashboard_id,
      contact_id,
      column_no,
      is_minimized,
      is_fullscreen,
      is_active,
      weight,
      content,
      created_date)
  select
      dashboard_id,
      35, -- replace with new contact id
      column_no,
      is_minimized,
      is_fullscreen,
      is_active,
      weight,
      content,
      NOW()
  from
      civicrm_dashboard_contact 
  where 
      contact_id = 1 -- replace with contact id whose dashboard you want to copy
  ;
  
  If you use a certain contact type/group/tag to define back office users, you can join to the appropriate table and do it all at once rather than one contact at a time.
  
  > **Comments:**
  > **username_0**: Thanks @username_2, this is not at all what I wanted to hear, but I am very grateful that you shared this query!  
  > **username_3**: I guess you could create an extension that do what username_2 propose automatically when a new contact is created using hook_civicrm_post.  
  > **username_0**: @username_3 creating an extension is a great idea! Thanks.  
  
  ---
  
  