Does TeamLead also exist on the Group object?
or only Support Group?
Also, I'd only return that object after verifying that its not null.
I have verified that there is a SupportGroup for HelpDesk - if I return just the variable Group (vice Group._TeamLead) it gives me [SupportGroup] HelpDesk.
I just checked the System.Group object - it has the same Team Lead (_TeamLead) attribute.
I was able to return Reminder.Incident.Assignments.Latest().Group._TeamLead -- I get back:
I have also tried pulling pretty much every other attribute from the group Object (e.g., Reminder.GetObjectByAttribute("System.SupportGroup", "Name", "HelpDesk").GroupType or ...CreateUser), and all of them pull the information correctly (or, at least, as a DataObjectProxy). Just not this one.
Have you seen this article, it may describe the issue your encountering. There's a conversation between Stu and Jason Cadman at the bottom that references trying to bring back user defined attributes from an object retrieved with GetObjectByAttribute(). This may be your answer.
From your screenshot it looks like _TeamLead is actually related at the System.Group level and not the Support Group level.
Try modding your calculation so it looks up System.Group instead of System.SuppportGroup.
It actually exists in both. I modded the code back to GetObjectByAttribute for System.Group - same error. This error has me quite vexed.
I had this same type of issue with a ProcessAssignment calculation trying to get the full category name and I ended up getting it to work like this:
Group = Reminder.GetObjectByAttribute("System.Group", "Name", "HelpDesk")
TeamLead = Reminder.GetObjectByAttribute("SystemUser", "Name", Group[_TeamLead].Name) <--- Those are [ BRACKETS ] on purpose. Basically it passes the TeamLead.Name value for the Support Group added into the value
What result does this give you?
I hadn't noticed this response earlier - this is actually exactly the solution. jcannon had the same thing, though the _attribute inside the [brackets] needs "double quotes" for it to work (eg Group["_TeamLead"]). Once I got the double quotes in there, it works. Or, appears to. It returns the DataObjectProxy when tested; I'll have to wait until I'm ready to turn email on to really test it.