Some users may experience random login-problems to our Community. We are investigating the root cause of this. If you get an error message from CloudFlare, please send the RayID in the message to support@superoffice.com. You may also clear your browser cookies and cashe to solve it. Thanks for your understanding. 

Trigger on Service: New message on request and messge.getAttachments() is empty

lock
push_pin
done
Besvaret
1

Hey,

We're trying to get the attachements for a message on this trigger, but Message.getAttachments() is empty when called.

If we manually set an old messageId, we do get the attachements. It's almost like the trigger fires before the attachments are stored.

Any clever work arounds here? I tried to get the trigger script to sleep. Or do a while loop and wait until the Integer array is filled with something. But seems like it never does. 
I hit execution timeout before the array has any entries. So maybe this is some job that is done after the trigger i run?

Best Regards

Bjørn

28. apr. 2025 | 02.18 PM

Alle Svar (1)

Hi Bjørn, 

I agree with you, it seems like the trigger is fired after the message is created, but before the attachments rows are added to the ticket_attachment table. You should report it to bug@superoffice.com.

30. apr. 2025 | 09.09 AM

Tilføj svar