Can't change priority field through the SDK

Hi,

I`m trying to update the priority and one custom field on a ticket using the sdk,

Here goes the sample code for the priority 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: "priority",
      value: 3,
    })
    .then(function (data) {
      console.log("success:", data);
    })
    .catch(function (error) {
      console.log("error:", error);
    });
}

I can see on the interface the priority field changing, however, on the promise’ result it goes through the .catch path, and the error returns as undefined (image below)

priority

Is there something I’m missing? I was expecting the code to go through the .then path, so I can continue with my regular process.

Hi @Alexa_Diaz

Hope you are doing good.

The code snippet shared by you works for me in local testing. Can you please check whether it works for you in local testing.

Regards,
Mughela Chandresh

1 Like

Hi @Mughela_Chandresh , thanks for the quick response.

I’m working locally (with fdk running on port http://*:10001/).

I created another developer instance, and still the behavior is the same.

Finally, I also checked the browser for insecure scripts permission on the instance domain, and is already set to enable.

Do you have any other clue I can check on?

Thanks!.

Hi @Alexa_Diaz

I cannot reproduce the issue from my end. Could you please share the test login credentials to your account where you are facing the issue or add me as an occasional agent in your account so that I can check.

My email : mughela.chandresh@freshworks.com

Thanks and Regards,
Mughela Chandresh

1 Like

Hi @Alexa_Diaz

The interface api succeeds but somehow the flow returns to exception handling. This is a known bug from freshservice side and the product team will be fixing it. You can skip the error handling part for now.

Hope this helps.

Thanks and Regards,
Mughela Chandresh

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.