Unable to reset value of ticket custom field to blank

Hi Team,

I’m currently facing an issue with resetting the value of a custom field in a ticket to blank or an empty value.

I’ve tried using the “setValue” interface method with an empty string or passing a blank value to the custom field, but it doesn’t seem to work as expected. The custom field retains its previous value and doesn’t reset to a blank state.

client.interface.trigger("setValue", { id: "field_name", value: "" });

I am reaching out for assistance in understanding if there are any specific considerations or alternative approaches to achieve this functionality.

Thank you in advance for your support and expertise. I look forward to hearing from the community and finding a resolution to this issue.

1 Like

Hi @Akhil_Moningii,

Could you answer these questions to replicate and check on my end?

  1. What is the data type of the custom field?
  2. What is the name of the field?
  3. What ID have you used for the field in the syntax?

Hi @Raviraj ,

  1. What is the data type of the custom field? text
  2. What is the name of the field? cf_case_category
  3. What ID have you used for the field in the syntax? cf_case_category

The syntax I used in the code is:

client.interface.trigger("setValue", { id: "cf_case_category", value: "" });

When I provide some value, it is working as expected.

@Akhil_Moningii I’m able to reproduce this issue.

I have created a support ticket (#14101766) for Freshdesk on behalf of you to analyze the issue and provide resolution or alternatives if available. I have also added you to the email loop.

@Akhil_Moningii Here’s the summary of the discussion and decision happened for this issue:

  1. Since I can reproduce this issue, I have created a support ticket for the Freshdesk team to analyze the issue.
  2. They have confirmed that passing an empty string will not reset the value for custom fields and provided an alternative script to reset the value for custom fields with an empty array. (client.interface.trigger('setValue', { id: 'field_name', value: [] }))
  3. Since it’s an intentional choice and the ask for an empty string is also reasonable. It has been accepted as a feature request to analyze and take up this change in the future to avoid any side effects and deprecation cycle for the previous syntax.
1 Like