In my application, ZAFClient.init() only works in the index, when I go to another page, this error occurs ("Uncaught TypeError: client.get is not a function"). How to fix this error, and make ZAFClient.init() work on other pages? Not just in my index.
This is my code, this is the page pattern, but it only works in my index.
<script>
$(document).ready(function () {
const client = ZAFClient.init();
client.get(['ticket.id', 'ticket.organization.externalId', 'ticket.status']).then(function (data) {
var ticketstatus = data['ticket.status'];
var idcli = data["ticket.organization.externalId"]
var ticket_id = data['ticket.id']
})
});
</script>