Flows - How to delete records in database

Hi everyone,

I’m building a flow that needs to delete records directly from the database. The Delete objects documentation says the node permanently deletes objects from the database when the data source is database-connected, and only removes them from the data source when it is runtime-only. However, I can’t find a clear setting for this on action data sources in flows.

The Action data sources documentation doesn’t describe this choice for flows. It only mentions that Persist objects writes to the database. When I look at the solution model, the data sources have a local property. Sources used to delete directly from the database have local: false, and sources that only read and count have local: true. I’m not sure whether this corresponds to a setting in the editor.

My questions:

  1. Where do I set runtime-only versus database-connected for an action data source in a flow?
  2. If that setting doesn’t exist for action data sources, what is the recommended way to delete records from the database in a flow?
  3. Is Data connector available in flows, or only in apps and services?

Thanks for your help!

Hi Preben,

Great seing you in the Community again!

  1. In Flows, all the data sources you add under Action Data Sources are runtime-only data sources. Database connected data sources do not exist in Flows.
  2. (and 3) To delete objects in a Flow, you use a Delete Objects action node and instead of selecting the tab Delete action data, you select Delete from database and then the appropriate object class. This behaves exactly as data connectors in Services and Apps. The action node will then be postfixed with a “(connector)” indicating that it deletes database records.

We’ll see if we can the docs a bit more up-to-date.

Hope that helps!

Thanks , didn’t notice the secret button :slight_smile: