How to delete the current record on a reusable delete popup

I have on almost all record pages, a Delete button that should open a popup that says confirm delete, where the user says delete or cancel. If they press cancel it closes the popup, and if they press delete, the way it works now is if I made the popup on the “Company” page, the workflow says “Delete the current page’s Company.”

I just made that popup a reusable element so that I can have the same consistent Delete popup on all pages without having to make it each time. The problem is that when I add it to a page, the workflow is broken since it’s saved with the “delete current page’s company” but the problem is I can’t see any way to just make it generic on the reusable element, such as just “Delete the current page’s record.”

Not sure if that makes sense, or if that’s possible?

Hi @lmoreau,

Make popup and set “type of content” to “text”. and add new state for this popup called ‘record_type’ example company or user (for selecting the database table).

While confirming the deletion pass the record unique id to popup text content and set the state for this popup is from table name.

After confirming the deletion. delete the record based on the popup state and unique id.