如何在 list view 一次刪除多筆 record / How to mass delete records from list view

要如何在 list view 選擇多筆 record 後一鍵刪除呢?



這個功能在 Salesforce 目前沒有內建。
你可以選擇下列幾種方式

  1. 安裝 APP
  2. 用 flow 來做
  3. 用 apex class 來做


安裝 App

有一個由 Salesforce Labs 釋出的 app,名字很直白就叫做 Mass Delete

官方說明文字

A set of custom list buttons that you can add to your standard list views or related lists. Users can select any number of records and delete all of them with a single click.


優點

快速簡單,即裝即用。


缺點

僅支援下列幾個現成的 standard object,如果需要用在 custom object,需要進行一點客製修改。
支援 object: 
  • Product
  • Solution
  • Contact
  • Contract
  • Lead
  • Opportunity
  • Account
  • Asset
  • Campaign
  • Case


使用在 custom object 的修改教學參考:

https://blog.cloudanalogy.com/salesforce-lightning-how-to-mass-delete-records-from-list-view/
概念上來說就只要 clone 它的 Visualforce Page 然後改第一行的 controller 即可。




用 Flow 來做

教學影片:https://youtu.be/3cdj8QCtYvI



用 Apex Class 來做

https://muskanagarwal1499.blogspot.com/2022/06/mass-delete-records-using-list-button.html

留言

這個網誌中的熱門文章

Salesforce證照考試心得 (Administrator and Advanced Administrator)

ISC2 CC (Certified in Cybersecurity Certification) 考試心得