<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Chatter on kenji.blog</title><link>http://kenji.blog/zh-cn/tags/chatter/</link><description>Recent content in Chatter on kenji.blog</description><generator>Hugo -- gohugo.io</generator><language>zh-cn</language><copyright>kenjinote</copyright><lastBuildDate>Mon, 19 Sep 2022 21:59:14 +0900</lastBuildDate><atom:link href="http://kenji.blog/zh-cn/tags/chatter/index.xml" rel="self" type="application/rss+xml"/><item><title>Salesforce Chatter 一键清空命令</title><link>http://kenji.blog/zh-cn/p/salesforce%E3%83%81%E3%83%A3%E3%83%83%E3%82%BF%E3%83%BC%E5%85%A8%E6%B6%88%E3%81%97%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89/</link><pubDate>Mon, 19 Sep 2022 21:59:14 +0900</pubDate><guid>http://kenji.blog/zh-cn/p/salesforce%E3%83%81%E3%83%A3%E3%83%83%E3%82%BF%E3%83%BC%E5%85%A8%E6%B6%88%E3%81%97%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89/</guid><description>&lt;img src="http://kenji.blog/p/salesforce%E3%83%81%E3%83%A3%E3%83%83%E3%82%BF%E3%83%BC%E5%85%A8%E6%B6%88%E3%81%97%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89/img_1.png" alt="Featured image of post Salesforce Chatter 一键清空命令" />&lt;h1 id="salesforce-chatter-一键清空命令">Salesforce Chatter 一键清空命令
&lt;/h1>&lt;p>这是一个在 Salesforce Chatter 中清空所有帖子和附件的命令。
打开开发者控制台，在 Debug 菜单中选择“Open Execute Anonymous Window”，粘贴以下代码并执行。
个人通常在组织存储容量告急时使用。&lt;/p>
&lt;div class="highlight">&lt;div class="chroma">
&lt;table class="lntable">&lt;tr>&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code>&lt;span class="lnt">1
&lt;/span>&lt;span class="lnt">2
&lt;/span>&lt;span class="lnt">3
&lt;/span>&lt;span class="lnt">4
&lt;/span>&lt;span class="lnt">5
&lt;/span>&lt;span class="lnt">6
&lt;/span>&lt;/code>&lt;/pre>&lt;/td>
&lt;td class="lntd">
&lt;pre tabindex="0" class="chroma">&lt;code class="language-fallback" data-lang="fallback">&lt;span class="line">&lt;span class="cl">delete [select id from FeedItem];
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">delete [select id from FeedAttachment];
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">delete [select id from ContentDocument];
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">// 清空回收站
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">database.emptyRecycleBin([select id from ContentDocument where IsDeleted = true ALL ROWS]);
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/td>&lt;/tr>&lt;/table>
&lt;/div>
&lt;/div></description></item></channel></rss>