Hello,
Scheduler 4.0.1.
Generally all is working correct on my system. But sometime (seldom) an event is updated, the user sees the change on front end but when the browser is refreshed the event is reset to original. Is there a way to make sure update was written into DB and if not show a warning to user? where should I look at and how to implement?
Hello @iti,
In case if an event wasn’t added to the DB due to some server side error, you can use the onAfterUpdate
event:
https://docs.dhtmlx.com/api__dataprocessor_onafterupdate_event.html
And check the response
parameter for any error responses.
In case if client wasn’t able to reach the backend(so there will be no response from the backend), you can use the onSaveError
event:
https://docs.dhtmlx.com/scheduler/api__scheduler_onsaveerror_event.html
So you can show any alert
or message
based on the backend response from any/both of events above.
Kind regards,
Thank You. I cannot find this method (onSaveError) in my scheduler version…Any other possibilities?
Hello @iti,
You can try to use the onFullSync
event:
https://docs.dhtmlx.com/api__dataprocessor_onfullsync_event.html
Which fires if everything goes well, so if it won’t fire - the data wasn’t sent correctly.
So you can use onFullSync
to set some “flag” variable, and create some timeout on data sending - if this flag isn’t set by the onFullSync
event - notify user.
Kind regards,
Hi Sergey,
would a good place for this check could be at the end of afterUpdateCallback: function (
and can you refer me to an example of the onFullSync in your docs please?