1

I need some help regarding Chatter email settings.

I am creating a custom Chatter application and need to configure email permissions from a custom page.

As per this page https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_user.htm, we can control them by setting various user fields.

However these settings are not overriding "My chatter settings" accessible from Personal Setup. Hence I am not able to turn off the email notifications.

I managed to find a Connect API method for Group Email settings :https://developer.salesforce.com/docs/atlas.en-us.198.0.apexcode.meta/apexcode/apex_ConnectAPI_ChatterGroups_static_methods.htm#apex_ConnectAPI_ChatterGroups_getMyChatterSettings

Does anybody have any idea about this?

2
  • Have you tried updating UserPreferencesDisableAllFeedsEmail to true on user object? This effectively disables email. help.salesforce.com/… Commented Dec 30, 2015 at 8:54
  • We want to provide users a way to control their email settings via custom interface. Commented Jan 1, 2016 at 3:34

1 Answer 1

1

Ahh it was tricky. Looks like salesforce maintains two set of these configurations at two different places

  1. User Object
  2. NetworkMember object

and Network Member supersedes the user configurations. Below is the query to get these details

chatterSettings = [select id, PreferencesDisableLaterCommentEmail,PreferencesDisableLikeEmail,PreferencesDisCommentAfterLikeEmail
                     FROM NetworkMember 
                    WHERE memberID=:userinfo.getUserId()
                    Limit 1];

After toggling these settings, chatter stopped sending emails to community users.

1
  • I logged out yesterday. Yes you got it right! Commented Jan 2, 2016 at 12:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .