Deactivating a Chatter user

To deactivate Chatter users, follow the path, find the user that you want to deactivate, edit the user records, uncheck the Active checkbox, and click on Save.

What happens when an owner of a Chatter Group is deactivated?

The deactivated user still owns the group; however, a user with the Modify All Data permission can assign a new owner.

Deleting feeds using the developer console

If you enable the Chatter feeds for some object, and some records from that object have lots of Chatter feeds that you want to delete, you can use the developer console to do so as you can't do this by using the user interface.

Deleting feeds using the developer console

In the preceding example, the user updated Amount in the opportunity feed many times, and it created a mass of unwanted posts in the Chatter feed. The people that are following this record will get updated in their Chatter feeds. Standard object feeds are stored in the ObjectFeed object (for opportunity, it's OpportunityFeed) and customs object are stored in the Object_Feed object. You can run a query via the workbench or the developer console.

The path to delete feed(s) from the developer console

The developer console is a cloud-based IDE with a group of tools that you can use to run the SQL query and debug and test applications in your Salesforce organization.

  1. Go to the developer console.
  2. In the upper-left corner, click on Debug | Open Execute Anonymous Window, as shown in the following screenshot:
    The path to delete feed(s) from the developer console
  3. The sample code to be added is given as follows:
      OpportunityFeed[] feed = [SELECT Id FROM OpportunityFeed where CreatedByID ='UserID' LIMIT 10];
    Delete feed;
  4. Paste the preceding code in the developer console's Enter Apex Code window, and click on the Execute button. Once the query executes the code, it will delete the last 10 fields tracked by the feed posts. You can modify the sample code according to your requirement.
    The path to delete feed(s) from the developer console
  5. Check the Open Log checkbox if you want to see what happens behind the scene. The logs will be opened in the Log Inspector window. Log Inspector is a viewer that shows the source of the action, what triggered the operation, and what occurred afterwards. You can use log inspector to check and debug logs that include database events, Apex processing, workflow, and validation logic.

    Note

    You can process only up to 10,000 records at a time using Apex. This limit is called a governor limit. When you delete feed items, they are not moved to the Recycle Bin. They are hard-deleted, and you cannot recover them.

To study more about working with logs in the Salesforce developer console, see the Log Inspector section in the Salesforce online help documentation.

Likewise, you can work on an account-object feed by referring the account feed for the custom Object__Feed object. The same query can be run from a workbench as well.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.14.141.171