Hopefully someone can help me out with the calculation required to achieve this.
Background: Various customers wanting specifically branded notifications, and specific message content, this is across the different modules.
Version: 7.3.2 (only for a few more months )
Proposed Solution: Created a new reference list object under process management called Message Templates (Could have been system) this contains a number of different fields to store the parts of a message.
It also has Group (Customer) dragged onto it, a reference list for class type (Incident, Problem, Change), a reference list for the message type (New, Update, Resolve, Assignment)
This new object has been related onto the reminder object of Incident Management (so far for testing).
When the correct Message Template is selected manually window copy rules grab a subject and body and add the values onto the Reminder window, so manually it works fine.
Issue: As part of the process automatic action, using a runtime window calculation can't set the subject and body of the reminder.
Attempts: Using GetNamedObject the correct template can be returned onto the Reminder window in the Message Template field (Works).
The window copy rules don't seem to get fired (Didn't think they would to be honest) and also can't use runtime value types as I believe the GetNamedObject calculation which sets the correct reference list is fired after the runtime value types, causing nothing to be returned.
What I'm attempting to do in the calculation is retrieve the object to a variable in the calculation and then grab a desired attribute which is then returned as the result, example below.
import System static def GetAttributeValue(Reminder): try: msgtyp = "New - Incident - CLA01300" tmp as object = Reminder.GetNamedObject("Process._TemplateMessages", "New - Incident - CLA01300") output = tmp._Subject.ToString() return output except e: return String.Format('Error on {0}: {1}', e.StackTrace.Substring(e.StackTrace.LastIndexOf(':') + 1), e.Message)
Result of the above is "Error on line 6: Field 'Touchpaper.Framework.Data.DataObject._Subject' not found."
So to sum up this tl:dr is it possible to use GetNamedObject and rather than return the object itself but rather attributes from it