Hi,
I`m trying to update one custom field (total) on a ticket using the sdk, but it doesn’t update the field.
Is there something I’m missing?
Here goes the sample code for the custom field:
document.addEventListener("DOMContentLoaded", renderApp);
function renderApp() {
app
.initialized()
.then(function (client) {
client.events.on("app.activated", function () {
supportDemo(client);
});
})
.catch(handleErr);
}
function supportDemo(client) {
client.interface
.trigger("setValue", {
id: "custom_field total",
value: 3,
})
.then(function (data) {
client.interface.trigger("click", { id: "updateProperties" });
console.log("success:", data);
})
.catch(function (error) {
console.log("error:", error);
});
}