PROBLEM Multiple event records were unexpectedly deleted in bulk—with the same timestamp, by the same user.
RESOLUTION An incorrect source model was used for the Button Set component containing the Delete action and there was no context condition defined for the Button Set.
A client reached out to Skuid Support after seeing multiple calendar event records in the Salesforce Recycle Bin that should not have been deleted. After confirming users were not manually deleting these records, We in Support suspected the source of the problem might be their Skuid page configuration. Their page contained a Calendar component that opens a popup allowing users to Edit/Delete records when they click on an event.
First, we wanted to confirm this was indeed a problem within Skuid
- by ruling out any Salesforce triggers that might be deleting calendar event records. There were none related to these calendar events.
Next, we checked each model on the Skuid page for any “rogue” model actions
- that might have been unintentionally triggered and deleting records. There were none.
- Then, we replicated the problem by creating multiple test calendar event records and found that deleting one event actually deletes multiple records for some reason.
- Finally, we discovered two problems with the configuration of their calendar:
The incorrect source model was being used for the Button Set component containing the Delete action. The page had two separate event sources on the Calendar component object, one for general events and one for non-account related events. For each source, there was a popup that contained a Button Set allowing users to Save/Delete records, but both sources were using the same model
- . This caused inconsistent behavior when adding and deleting records. The non-account events source was updated to use the correct model
There was no context condition defined for the Button Set containing the “delete event” action. They needed to add a context condition
- to the Button Set, so that actions are only performed on the respective row in context, not on all records.
This turned out to be a page configuration problem. By ensuring that the Button Set inside of the Calendar event sources was using the correct model and context conditions, we were able to prevent records from unintentionally being deleted.
If you ever suspect that Skuid actions (i.e. delete or update) are being performed on multiple records instead of one, be sure you check the context of the component containing the action.
Get help with an issue
Ask in the Skuid user community in the
If you have paid support, ask your question on our support portal
- If you’re interested in support, contact your Account Executive.