ServerAPI.SetNewContactNotification Method
Sets the NotifyOnNewContact property of the LocatableUser object for the user identified by the domain and alias.
Public Sub SetNewContactNotification (domainAlias As System.String, _ notifyOnNewContact As System.Boolean)
[C#]
public SetNewContactNotification (System.String domainAlias, System.Boolean notifyOnNewContact);
Parameters
- domainAlias
Sets the user's domain and alias as a string, in the format "domain\user". For information about the maximum length of the domainAlias argument, see MapPoint Location Server Parameter Lengths.
- notifyOnNewContact
The notification value on the new contact flag as a Boolean value. For more information about the term notify on contact, see the Glossary.
Remarks
For more information about the term notify on contact, see the Glossary.
Example
[Visual Basic]
'Create a new instance of the ServerAPI class
Dim MyServerAPI As New ServerAPI
Try
'Initialize the database connection for ServerAPI operations
MyServerAPI.Initialize("Your SQL Server Name", "LocationServerDB")
'Now set the Contact Notification flag for the domain alias DOMAIN\user
'True means that the user gets a notification if he/she is added as a contact to somebody else's list
'False means that the user will NOT get a notification if he/she is added as a contact to somebody else's list
MyServerAPI.SetNewContactNotification("DOMAIN\user", False)
Catch MyException As Exception
'Process your exceptions here
Console.WriteLine(MyException.GetType().Name)
Finally
'Do cleanup
MyServerAPI = Nothing
End Try
[C#]
//Create a new instance of the ServerAPI class
ServerAPI MyServerAPI = new ServerAPI();
try
{
//Initialize the database connection for ServerAPI operations
MyServerAPI.Initialize("Your SQL Server Name", "LocationServerDB");
//Now set the Contact Notification flag for the domain alias DOMAIN\user
//True means that the user gets a notification if he/she is added as a contact to somebody else's list
//False means that the user will NOT get a notification if he/she is added as a contact to somebody else's list
MyServerAPI.SetNewContactNotification(@"DOMAIN\user", false);
}
catch(Exception MyException)
{
//Process your exceptions here
Console.WriteLine(MyException.GetType().Name);
}
finally
{
//Do cleanup
MyServerAPI = null;
}
See Also
LocatableUser Class | Microsoft.MapPoint.LocationServer.Management | ServerAPI Class | ServerAPI Members