I'm trying to load up all of the emails that have been sent from a transaction via SuiteScript 2.0.
When I run
record.getSublists()
it returns the following:
["item","activeworkflows","workflowhistory","custom8","messages","contacts","activities","usernotes","systemnotes","mediaitem","links","cases","partners","events","calls","tasks"]
However, when I then try to run the following:
record.getSublist('messages');
I receive an error.
I need to be able to check the date of the last email sent so I can determine whether or not to send a follow-up email.
The approach I typically take is to use the Search API to get this type of information: