client.instance.close() bugging API when trying to close

Hello together,


I created an app for freshdesk, which opens a modal dialog with some input fields.

Filling that fields and push "submit" button results in creating a ticket note via api 

 

api/v2/tickets/"+ticket_id+"/notes

and updating the ticket -> changing assigned group

 

api/v2/tickets/"+ticket_id

This works fine overall.

Then I decided to close the modal within hitting the submit button with "client.instance.close()"...doing this, the modal closes but the note is not created anymore and group is not changed via api.

Commenting out client.instance.close() solves this problem again.


 How do other script parts depend on the modal closing so that my api call is not triggered anymore? 


Regards

Login or Signup to post a comment