Hello Freshdesk team,
I’m experiencing an issue with the client.interface.trigger("setValue", ...)
method inside a custom Freshdesk app.
Problem Description
When I access a ticket for the first time after a page refresh, calling client.interface.trigger
correctly sets a custom field (with ID cf_rfrence_de_contrat
).
However, if I:
- Navigate back to the list of tickets (e.g., via breadcrumb or sidebar),
- Then select a different ticket,
The same client.interface.trigger
function silently fails to update the field — no error is thrown, and the onSuccess
callback is still called, but the field value is not updated in the UI.
Reproducible Steps
- Refresh the Freshdesk page.
- Open a ticket →
client.interface.trigger
works. - Navigate back to the ticket list.
- Open another ticket.
- Trigger the same function → nothing happens in the UI (no error either).
Code Example
Here is the relevant snippet:
export const updateTicket = async (
client: FreshdeskClient,
subscription_id: string,
onSuccess?: (id: string) => void
) => {
try {
await client.interface.trigger("setValue", {
id: "cf_rfrence_de_contrat",
value: subscription_id,
});
if (onSuccess) {
onSuccess(subscription_id);
}
} catch (error) {
console.error("Erreur lors de la mise à jour du ticket:", error);
}
};
This function is called when clicking a button inside a React component.
Expected Behavior
client.interface.trigger("setValue", ...)
should work consistently every time the ticket details page is active — even after navigating from another ticket.
What I’ve Tried
- Verified that
client
is still valid. - Checked that
onSuccess
runs (it does). - Looked for errors in the console (none).
- Logging confirms the call happens, but the UI does not update.
Environment
- Custom App using FDK v9.3.1
- React 18 (rendered via
ReactDOM.render
for compatibility) - Field ID:
cf_rfrence_de_contrat
Please let me know if there’s a lifecycle or app context issue I should handle differently when navigating between tickets without a full reload.
Thanks in advance!