Due to the complex environment here, I'm trying to look up a group
object, read an attribute, depending on its value look at other
attributes on the group (member / owner), then look up each required
member / owner for their email address. At any stage, the attribute may
or may not exist.

I can read the multivalued attributes (member / owner), but every loop
solution I use gives me grief....

Source ECMA (with some things **** for redaction):


Code:
--------------------
try
{
var notifMembers = IDVault.get(objectDN, '****Group', 'Member');
trace("findNotificationEmails(): notifMembers " + notifMembers.toString(), 3);
if ((notifMembers != undefined) && (notifMembers != null))
{
for (var m in notifMembers)
{
trace("findNotificationEmails(): Find Email Addresses for " + notifMembers[m], 3);
try
{
var notifEmailAddress = IDVault.get(notifMembers[m], '****User', 'InternetEMailAddress');
trace("findNotificationEmails(): notifEmailAddress " + notifEmailAddress, 3);
if ((notifEmailAddress != undefined) && (notifEmailAddress != null) && (notifEmailAddress != ""))
{
toaddresses.push(notifEmailAddress);
}
}
catch(e)
{
trace("findNotificationEmails(): Error " + e, 1);
}
}
}
}
catch(e)
{
}
--------------------


The trace outputs:


Code:
--------------------
2016-02-29 13:47:43,282 [****] findNotificationEmails()
2016-02-29 13:47:43,282 [****] findNotificationEmails(): objectDN cn=*********,ou=*********,ou=*********,o=*********
2016-02-29 13:47:43,287 [****] findNotificationEmails(): mailTarget MEMBER
2016-02-29 13:47:43,289 [****] findNotificationEmails(): Error TypeError: Cannot read property "toString" from null
2016-02-29 13:47:43,291 [****] findNotificationEmails(): notifMembers [cn=*********,ou=*********,ou=Active,ou=Workforce,o =Communities, cn=*********,ou=*********,ou=Active,ou=Workforce,o =Communities, cn=*********,ou=*********,ou=Active,ou=Workforce,o =Communities]
2016-02-29 13:47:43,291 [****] findNotificationEmails(): Find Email Addresses for false
2016-02-29 13:47:43,291 [****] findNotificationEmails(): Error JavaException: com.novell.soa.af.ProvisioningException: Identifier [false] does not exist for this service operation.
--------------------


Why the flock am I only ever getting "false" as a loop value??


--
-"Also now available in 'G+'
(http://plus.google.com/+BenWalter-Kiwi) and 'Website'
(https://www.isam.kiwi/) format".-
------------------------------------------------------------------------
ScorpionSting's Profile: https://forums.netiq.com/member.php?userid=469
View this thread: https://forums.netiq.com/showthread.php?t=55446