Hi team, trying to do some customisation on the ou...
# suitescript
c
Hi team, trying to do some customisation on the outbound customer email template with cases, and it turns out that the 'incoming' field that is stored on a message is always set to true, and the only way to get the field that shows on saved search for isincoming that actually works correctly, is to just run a saved search (as confirmed by NetSuite Support)... as such, I am attempting to run a beforeLoad to run this search and store in a temp text field to play with. This is working as expected for view and edit, however when editing and entering a message in the 'Outgoing from Support Rep' section of the case, the email that is sent apparently does not actually fire any sort of context. I have the script deployment status set to deployed and can see when it fires in view & edit contexts, but there is nothing happening when this email is sent. Is there a trick I am missing or is there just no way to get script to fire when emails are sent in this way?
s
hi @cweier
I have just an experience in this problem
can I help you?
this can be done by suite scripting.
c
Hi @superman1987417, could you please advise how to get a script to fire when sending an email in this way? Happy to write the code etc myself, just looking for some guidance on where to start
s
hi @cweier
could you show me the outbound customer email template with cases?
could you be more specific about the issue you are facing?
I sent you a DM
could you reply?
c
Hi, I am attempting to read the 'isinbound' field on messages created from Cases, so that I can create an email template that loops through Messages attached to a Case until it reaches the first inbound email, as in theory the last inbound message should have all previous back and forth correspondence, so only outbound messages created after the last inbound message need to be included. This field is only available via Saved Search so I have created a script that executes correctly when viewing the record and dumps the search result into a field, however scripts don't seem to be firing when an email is sent from the Case record.
s
@cweier
Could you reply me on DM channel instead of this jobs channel?
Copy code
I have created a script that executes correctly when viewing the record and dumps the search result into a field, however scripts don't seem to be firing when an email is sent from the Case record.
Could you share this script so I can review?