Recent searches
No recent searches
Trigger Overwriting Field
Posted Sep 19, 2024
Hello All,
I have a custom field (Integrations) set up on both my organization fields and ticket fields. This field is a multiselect. I want to keep these fields in alignment, meaning, if a ticket is created by an organization, I can grab the integrations from the org field and populate the ticket field, or if the integrations are updated on the ticket field, I want to update the organization field.
Problem I'm running in to using triggers, is this seems to overwrite. For instance, if I have integrations A and B selected in my organization field, and open a ticket, A and B populate to my ticket field. However, if I add integration C to the ticket field, it is wiping A and B from the organization field and only showing C.
Is there a way around this or a better way to go about aligning these fields?
0
1 comment
Oscar Mejias
This is an expected behaviour when updating multi-select field values both via trigger and API as discussed in this post. The recommendation we make is that you either look into adding the values via tags using triggers or consider implementing a solution with a webhook where you update the ticket using the Update Many Tickets endpoint.
Please have a read on Protecting against ticket update collisions and Adding tags to tickets without overwriting existing tags.
Thanks!
0