How to listen to ticket change
Hello community,
I created a widget, which checks all departments, if the user has written there as well, as some customer do this.
Overall it works fine, except that I have to refresh the widget tab every time I go to another ticket. How can I listen for that "ticket change" event? I tried App.on and ZOHODESK.Event.on, but only get the error, that both are not a function:
- //Wait until SDK is loaded
- ZOHODESK.extension.onload().then(function (App) {
- // First loading (works)
- loadTicketData();
- // Here I get the error
- App.on("Ticket_Changed", function (data) {
- loadTicketData();
- });
- });
Attached I send you the full widget file. Any help is much appreciated!