Hi,
I created a custom field in Service Desk. My customer will insert some unique value in this field while creating a ticket in service desk.
I want to add custom script for this custom field. I will use this field to verify its value through a 3rd party API. I have the code but I don't know where to add this custom script for the custom field.
<script>
$(document).on('click', '.aui-button.aui-button-primary', function (e) {
$.ajax({
url: API_URL
dataType: "json",
method: 'post',
data: {
'action': ENVATO_API,
'value': API_KEY
},
success: function (data) {
if (data.success) {
return true;
} else {
return false;
console.log('Invalid envato key')
}
},
error: function (errorThrown) {
console.log(errorThrown);
}
});
})
</script>