We wrote code to update future bookings on a calendar, we want it to run when an event is dragged to a new date. Any ideas?
You could run the Snippet as a result of a Model Action on the Model(s) corresponding to your Calendar Event Sources.
For instance, if you have a Model on the Salesforce Event object that is used as a Calendar Event Source, then you could add a Model Action to the event Model on the “Row in Model updated” Initiating Event, on the StartDateTime/EndDateTime fields. Add a Snippet as the one Action that gets run. This will be run whenever the StartDateTime or EndDateTime fields are changed on your model. You could do something similar for each of the other Event Source Models on your calendar, you could have a Model Action defined for each Model, all on the “Row in Model updated” Initiating Event, that runs the same JavaScript Snippet.
Wow. Just wow… Thanks Zach.
Zach, Thanks. We started with that solution and our issue was that if someone tries to edit it in list view, the action starts to run right when we select a field to edit it, that is before we type in the edits that need to run. We also tried to change it to trigger when the model is saved. Finally, we found that we needed two duplicate models to run the snippet, one to loop over, and one to view on the calendar. This further complicates the action. We came up with the idea of a row action, yet that gets a bit clunky. Any ideas for how to fire the edits when the editing is finished, rather than when it starts?
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.