boogray - Monday, November 9, 2009 4:57 AM:
I use the "email() function" to send email in a method. But it just can send to an identity which is with alias. If there's not a alias identity, It can't send the email. How can I send an email to a group identity by coding?
Thx.
tstickel - Thursday, November 12, 2009 10:36 AM:
boogray
I assume that you have existing code that is using the item.email() method.
The Identity itemtype has a relationship type, "Member", which links a group Identity to its member Identities. E.g. you could define a group Identity named "Reviewers" and assign the following alias Identities as Members of the "Reviewers" Identity: "Fred Smith", "Alice Jones" etc.
To send e-mails to the members of the "Reviewers" group your code would first retrieve the "Reviewers" Identity and then cycle through the "Member" relationships to retrieve the alias Identity of each member and send the e-mail to the alias Identity. The Aras Innovator Programmers Guide includes an example of how to do this type of relationship navigation, see the section "Query for an Item and return its configuration". The example users the Part itemtype and the Part Bom relationship, but concept is the same for the Identity itemtype and Member relationship
Nian - Thursday, July 14, 2011 10:26 AM:
Hi boogray
Would you mind sending me the code you used for this solution of yours, please?
I just cannot get the thing right...!
Thank you
Nian