var columns = new Array();
columns[0] = new nlobjSearchColumn('subject');
columns[1] = new nlobjSearchColumn('internalid');
columns[2] = new nlobjSearchColumn('messagedate').setSort(true);
var filters = new Array();
filters[0] = new nlobjSearchFilter( 'recipientemail', null, 'is', 'test@test.com')
var searchresults = nlapiSearchRecord( 'Message', null, filters , columns);
if (searchresults != null && searchresults != '') {
var emailinfoid = searchresults[0].getValue('internalid');
var emailinfosubject = searchresults[0].getValue('subject');
nlapiLogExecution('DEBUG','SUBJECT',emailinfosubject);
}
No comments:
Post a Comment