I'm working on a Status.io integration and I'm having a bit of difficulty dealing with the ZAFClient in the context of a pop-out modal. My code can be found here:
When creating an incident, I have the app invoking a modal which contains a form with some fields that are necessary in the API request that gets sent to Status.io. However, I'm seeing some peculiar behavior. I had this working correctly before I tried putting the form inside a modal, by that I mean I was able to create an incident from the app. Now, when I try to submit the form from the modal, I'm getting an error in the console:
Uncaught TypeError: client.invoke is not a function
It's like it's looping back to the beginning of my modal.js script and the client object is no longer instantiated. I can see it instantiated, however, in the console when the app is initially loaded.
I am attempting to pass the parent client guid to the modal so I have access to the ticket and, to do so, I initially referred to this blog post to try and get it working: https://developerblog.zendesk.com/making-modals-work-in-zaf-v2-251b7c940e58
Please sign in to leave a comment.