Hi
I want to resolve the AD user for dynamic destinations, but I only have the Email address exposed to the process. How do i do it? The DSHelper is supposed to help me, but I cannot seem to get it to work correctly.
public void Main(ref DestinationRuleContext K2) {
K2.ResolveQueuesToUsers = true;
SourceCode.K2Utilities.DSHelper oDSH = new SourceCode.K2Utilities.DSHelper(SourceCode.K2Utilities.DSHelper.DSHelperNewOptionsEnum.DefaultLDAPDomain);
System.DirectoryServices.DirectoryEntry oDEManager;
string sManager;
bool bAllTrue = true;
CDest1 oDest1 = new CDest1();
oDest1.Main(ref K2);
if (oDest1.IsSuccess == true) {
//== sendto
K2.Destinations.Add(DestinationType.User, @"NO
solheim");
if (bAllTrue == false) return;
}
SourceCode.K2Utilities.DSHelper oDSH = new SourceCode.K2Utilities.DSHelper(SourceCode.K2Utilities.DSHelper.DSHelperNewOptionsEnum.DefaultLDAPDomain);
System.DirectoryServices.DirectoryEntry oDEManager;
string sManager;
bool bAllTrue = true;
CDest1 oDest1 = new CDest1();
oDest1.Main(ref K2);
if (oDest1.IsSuccess == true) {
//== sendto
K2.Destinations.Add(DestinationType.User, oDSH.GetUser("email",K2.ProcessInstance.DataFields["AssignedTo"].Value.ToString()));
if (AllTrue == false) return;
}
}
Regards
Arne
Getting AD destination from email address
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.