I'm trying to reuse as much JS as possible in my User Application. I
currently have a small method which is designed to look up the DN for a
given type of approver. I was
hoping I could use this to set the "Escalation Addressee" in a PRD
Workflow Approval task.

Is there any way to do this, or will I have to replicate this logic in
every escalation property for each PRD?

Thanks in advance.
Adam

---snip---
// Pass IDVault and approverName
//
// approverName one of - NOSNotification, NotesNotification,
HRNotification, ServiceDeskNotification, (ManagerNotification)
this.getApprover = function(IDVault, approverName) {
// Entering
if ((IDVault != null) && (approverName != null)) {
this.logHandler("getApprover: entering")
} else {
this.logHandler("getApprover: leaving (error)");
return null;
}

var recipients;
var finalApprover;

try {
// Retrieve all recipients
recipients = IDVault.globalList(null,
"notifications","");
for (var i=0;i<recipients.length;i++) {
// Found a recipient match
if (recipients[i] == approverName) {
// Retrieve recipients DN
finalApprover = recipients[i][0];
this.logHandler("getApprover: Returning " +
finalApprover);
return finalApprover;
}
}
} catch (e) {
this.logHandler("getApprover: leaving (error). Setting
approver to defaultApprover.");
finalApprover = this.defaultApprover;
return finalApprover;
}
---snip---

--
Identity Concepts
Mobile : +61 419 637 518
email : adam_j_bradley \at\ identityconcepts.com.au
irc: #nidm on freenode.net
Web : http://www.identityconcepts.com.au