Anyone have any idea why this would not work in the process to populate the resolution text in an automatic action?
import System
static def GetAttributeValue(Resolution):
lastSerial = Resolution.Incident.Notes.Max("SerialNumber")
for Note in Resolution.Incident.Notes:
if Note.SerialNumber == lastSerial:
Value = Note.Text
return Value
A decision is proceeding to the resolve action if the note gets added with a particular note title. However, in this calulation, lastSerial is always null.