function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
THIBAULT LOMBARDOTHIBAULT LOMBARDO 

Create an Invocable class to delete records from flow

Hello everyone,

I would like to create a list button "mass delete" action from a screen flow. The idea is to delete records selected in the list view. I build my flow with ids variable , but the delete element need a specific type of object. 

The idea is to put this "mass delete " button on multiple list view of differents objects (account, contact, case , custom objects) without create one flow by object type . I would like to know if it 's possible to create an invocable apex class  based on Sobject and database.delete , to delete ids selected ?

I'm totally newbie in Apex langage , 
If someone could help me write this invocable class I would appreciate it. Thanks a lot.
akams networksetupakams networksetup
aka.ms/networksetup (https://akamsnetworksetup.info/" target="_blank): It would be best if you connect to the internet during the Windows 11 installation process to guarantee that you receive the most recent security updates.