Troubleshooting Tip - Clear Record Placeholders Before Deleting a Record

Hey folks, this question has come up a few times in office hours, so I wanted to address it here.

When trying to delete a record from a Table, many folks are getting a “cannot delete record that is in use” error. What this means is that you need to clear the record place holder first. The trick is to create a variable for storing the ID locally, clear the record placeholder, and then use that variable to delete the record.

I’ve outlined the video below

2 Likes

I believe the asterisk here is that in Dev Mode you do not need to clear the record placeholder like this. You didn’t show this in this video, because you are building like you would for production. But it is very confusing for new users when you are able to “delete” records in Dev Mode without following these steps. Then it won’t work in production.

Looks like this is directly related to my latest suggestion about a differentiation between a read-only and a write lock mode for the placeholders.

… with the added problem that lately, we have observed that under certain conditions the mentioned trick with clearing the placeholder first does not seem to do the trick and the player will still throw a “record locked” error…

https://community.tulip.co/t/introduce-an-explicit-read-write-lock-for-placeholder-records/11789/2