Managing dataset events

I understand some of the logic and UI changed with datasets (or “CMS”) now. When the datasets used to be a physical item on each page, you could select the item and assign events to it such as onReady() , etc.

For some reason, I can’t find out how to get the element id for a specific dataset to show here:
image
like it used to… so unsure how to access/manage events for that item.

Any help?

Hello, user2971!! Yes, recently, data sets are no longer placed as items on the page. Please select “CMS” from the left panel in the editor and choose an option like “Manage Page Connections.” This will open a panel on the right side of the editor where you can view the list of data sets. You can also check the IDs of the data sets from here!

Thank you.

So, previously I had one of the datasets’ events exported into code. I’ve removed it now but browser console still shows it as a registered event.

What I’m trying to ask is how can I add/remove/modify static event handlers for the the dataset now? Just because I remove the exported code for it doesn’t technically disconnect the event handler from the actual element.

Ah, I see. I misunderstood your question, and I apologize for that. Personally, since I write dataset-related events directly within onReady(), I hadn’t thought of that approach…

It’s all good. It used to be handled differently and I can’t figure out how to modify those events post-update.

I think I understand what you mean. You had connected a dataset to an element on your page and added events from the editor’s panel, but now that option is no longer available, and you’re unable to remove the registered events. It sounds similar to situations I’ve experienced where unintended event duplications occurred. I usually avoid registering events from the editor to prevent such issues.

Since I haven’t experienced exactly the same situation as yours, I’m not sure about the perfect solution. However, one possible approach could be to delete the existing dataset and replace it with a new one.