forcing an event to refresh

Hi there,

On the scheduler, when I create a new event, I have a field called “Etiquette” which translates to what I call the label of the event on the basic view of the scheduler. As shown in my screenshot, I’m first assigning a label of “TODO” to a new event and, when it’s created, I update this label to something like “TODO - 45” where 45 is the ID inside the database.

Now, I do all of this treatment in the “AfterProcessing” event using the get_new_id() method of the $action object and it works. The label is successfully changed into the database, but not on the scheduler (which makes sense of course since all of this happens ‘after the processing’).

So, my question is actually very simple. Is there a way to force a particular event to refresh itself so that the label on the scheduler reflects the changes into the database? Or should I use another event altogether to do what I’m trying to do?

Thanks in advance.

Osu


Hi,

You can attach to the onEventIdChange event and change event text there.

Best regards,
Ilya

Thanks a lot, it’s working now. Though I have to call the scheduler.select() method otherwise I have to click on the event for it to actually show that there’s been any change to its text.

Anyway, thanks for the quick response.

Osu

To update event rendering use updateEvent function, it wouldn’t select event (i believe event selection is not expected behavior).

Best regards,
Ilya

Thanks a lot, it’s better now :slight_smile:.