SalesforceのSOQLを利用して日別のレコード作成数を取得する方法

SalesforceのSOQLを利用して日別のレコード作成数を取得する方法 開発者コンソールを開く Query Editorタブを開く 下記のSOQLを貼り付けて実行する。 selectday_only(createdDate),count(createdDate)fromaccountgroupbyday_only(createdDate)orderbycount(createdDate)desclimit10accountは取得したい任意のオブジェクト名に変えて実行してください。 参考 Is there a way to group by the date portion of a datetime field in SOQL?

Salesforceチャッター全消しコマンド

Salesforceチャッター全消しコマンド Salesforceのチャッターで、すべての投稿と添付ファイルを全消しするコマンドです。 開発者コンソールを開き、Debugメニューの「Open Execute anonymous Window」を選択し、以下のコードを貼り付けて実行してください。 個人的に組織の容量が切迫してきた際に使用しています。 delete [select id from FeedItem]; delete [select id from FeedAttachment]; delete [select id from ContentDocument]; // ゴミ箱を削除 database.emptyRecycleBin([select id from ContentDocument where IsDeleted = true ALL ROWS]);