Looking for PowerObjects? Don’t worry, you’re in the right place! We’ve been part of HCL for several years, and we’ve now taken the final step in our acquisition journey: moving our website to the HCL domain. Nothing else is changing – we are still fanatically focused on Microsoft Business Applications!

PowerObjects Blog 

for Microsoft Business Applications


Increase the CRM Activity Feed Follow Limit through PowerShell

Post Author: Joe D365 |

When a user "follows" a CRM record, they are able to see posts about that record on their personal wall. This wall contains posts about the records the user is following, posts regarding the user themselves, or posts that mention the user. Today's blog describes how you can increase the activity feed follow limit per user for a CRM on-premises deployment using Windows PowerShell. Let's get started!

The maximum number of records a user is allowed to follow is 5,000. However, that number is set to 1,000 by default. This value is configurable and can be changed by an administrator or a user with the permissions to modify CRM deployment settings. A list of other deployment settings is provided here: https://msdn.microsoft.com/en-us/library/hh547394.aspx.

Windows PowerShell enables you to easily run deployment commands to change the configuration of your CRM on-premises deployment, such as tasks that can be performed by using the Deployment Manager user interface and more. You can also use the methods that are described in the Microsoft Dynamics CRM SDK to perform these tasks. The PowerShell cmdlets are installed on your computer when you install a Full Server role or when you install the Deployment Tools server role if you're installing individual server roles. To execute commands, you must first register the Microsoft Dynamics CRM commands with PowerShell.

If your CRM organization requires that users be able follow more than 1,000 records:

1. Create the following PowerShell script to update the advanced setting called ActivityFeedFollowLimit.

Param

(

#optional params

[string]$ConfigurationEntityName =“Deployment”,

[string]$SettingName =“ActivityFeedFollowLimit”,

[object]$SettingValue =“5000”,

[Guid]$Id

)

$RemoveSnapInWhenDone = $False

if (-not (Get-PSSnapin -Name Microsoft.Crm.PowerShell -ErrorAction SilentlyContinue))

{

Add-PSSnapin Microsoft.Crm.PowerShell

$RemoveSnapInWhenDone = $True

}

$setting = New-Object “Microsoft.Xrm.Sdk.Deployment.ConfigurationEntity”

$setting.LogicalName = $ConfigurationEntityName

if($Id) { $setting.Id = $Id }

$setting.Attributes = New-Object “Microsoft.Xrm.Sdk.Deployment.AttributeCollection”

$keypair = New-Object “System.Collections.Generic.KeyValuePair[String, Object]” ($SettingName, $SettingValue)

$setting.Attributes.Add($keypair)

Set-CrmAdvancedSetting -Entity $setting

if($RemoveSnapInWhenDone)

{

Remove-PSSnapin Microsoft.Crm.PowerShell

}

2. Save the script as a Windows PowerShell cmdlet File (for example, SetActivityFeedFollowLimit.ps1).

3. Execute the cmdlet file as follows:

a. Log on to the administrator account in your Microsoft Dynamics CRM server.

b. Open a PowerShell command prompt.

c. Enter the following command:

Add-PSSnapin Microsoft.Crm.PowerShell

Note: This command adds the Dynamics CRM PowerShell snap-in to the current session. The snap-in is registered during installation and setup of the Microsoft Dynamics CRM server.

d. Enter the following command pointing to the file location of the previously created cmdlet:

SetActivityFeedFollowLimit.ps1

Sample code for setting writable values in advanced settings tables can be found here.

Please note that updating the ActivityFeedFollowLimit setting will adjust the value for all CRM organizations hosted on a set of CRM servers. Additionally, this value can only be updated via PowerShell for CRM on-premises customers.

That's all for today readers! We hope you found today's tutorial useful. Interested in learning more? Check out our CRM Book, where you can access information regarding anything and everything CRM!

Until next time, happy CRM'ing!

Joe CRM
By Joe D365
Joe D365 is a Microsoft Dynamics 365 superhero who runs on pure Dynamics adrenaline. As the face of PowerObjects, Joe D365’s mission is to reveal innovative ways to use Dynamics 365 and bring the application to more businesses and organizations around the world.

One comment on “Increase the CRM Activity Feed Follow Limit through PowerShell”

  1. We currently have an on-premise installation of CRM 2013. I was able to find the follow up limit setting in the MS_Config SQL database. Is there a downside to updating the setting directly in SQL? Do we have to use PowerShell?

PowerObjects Recommends