Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This topic shows how to provision an object for a Lotus Notes connected data source for a user without an identification file.
If you are referencing a file that is located in a folder for the CSEntry.DN value, such as for the Notes Address Book (NAB) value, use a forward slash (/) to separate the folder from the file name, for example: folder/file name.
The following Visual Basic .NET example shows how to provision an object for a Lotus Notes connected data source for a user without an identification file.
Public Sub Provision(ByVal mventry As MVEntry) _
Implements IMVSynchronization.Provision
Dim ManagementAgent As ConnectedMA
Dim Connectors As Integer
Dim csentry As CSEntry
Dim DNName As String
Dim DNCertifier As String = "O=Main"
If mventry("EmployeeStatus").IsPresent _
AndAlso mventry("EmployeeStatus").Value.Equals("active") Then
ManagementAgent = mventry.ConnectedMAs("Lotus Notes MA")
Connectors = ManagementAgent.Connectors.Count
If 0 = Connectors Then
csentry = ManagementAgent.Connectors.StartNewConnector("person")
DNName = mventry("sn").Value
If mventry("middleName").IsPresent Then
DNName = mventry("middleName").Value + " " + DNName
End If
If mventry("givenName").IsPresent Then
DNName = mventry("givenName").Value + " " + DNName
End If
DNName = DNName + "/" + DNCertifier
' Set the property values to provision the object.
csentry.DN = ManagementAgent.EscapeDNComponent("CN=" _
+ DNName).Concat("NAB=names.nsf")
csentry("LastName").Value = mventry("sn").Value
csentry("_MMS_Certifier").Value = DNCertifier
csentry("_MMS_IDRegType").IntegerValue = 1 ' U.S. User
csentry("_MMS_IDStoreType").IntegerValue = 0 ' No identification file
' Finish creating the new connector.
csentry.CommitNewConnector()
End If
End If
End Sub
The following C# example shows how to provision an object for a Lotus Notes connected data source for a user without an identification file.
void IMVSynchronization.Provision (MVEntry mventry)
{
ConnectedMA ManagementAgent;
int Connectors;
CSEntry csentry;
string DNName;
string DNCertifier = "O=Main";
if(mventry["EmployeeStatus"].IsPresent)
{
if(mventry["EmployeeStatus"].Value.Equals("active"))
{
ManagementAgent = mventry.ConnectedMAs["Lotus Notes MA"];
Connectors = ManagementAgent.Connectors.Count;
if(0 == Connectors)
{
csentry = ManagementAgent.Connectors.StartNewConnector("person");
DNName = mventry["sn"].Value;
if(mventry["middleName"].IsPresent)
{
DNName = mventry["middleName"].Value + " " + DNName;
}
if(mventry["givenName"].IsPresent)
{
DNName = mventry["givenName"].Value + " " + DNName;
}
DNName = DNName + "/" + DNCertifier;
// Set the property values to provision the object.
csentry.DN = ManagementAgent.EscapeDNComponent("CN="
+ DNName).Concat("NAB=names.nsf");
csentry["LastName"].Value = mventry["sn"].Value;
csentry["_MMS_Certifier"].Value = DNCertifier;
csentry["_MMS_IDRegType"].IntegerValue = 1; // U.S. User
csentry["_MMS_IDStoreType"].IntegerValue = 0; // No identification file
// Finish creating the new connector.
csentry.CommitNewConnector();
}
}
}
}
See Also
Lotus Notes Connected Data Sources
Lotus Notes Properties
Send comments about this topic to Microsoft
Build date: 2/16/2009