Share via


AddUserToList Method

Adds a user to a mailing list.

Namespace:  Microsoft.CommerceServer.Marketing.WebService
Assembly:  Microsoft.CommerceServer.Marketing.DataManagement (in Microsoft.CommerceServer.Marketing.DataManagement.dll)

Syntax

'Declaration
<WebMethodAttribute> _
Public Overridable Function AddUserToList ( _
    listId As Guid, _
    user As MailingListUserData _
) As Integer
'Usage
Dim instance As MarketingWebService
Dim listId As Guid
Dim user As MailingListUserData
Dim returnValue As Integer

returnValue = instance.AddUserToList(listId, _
    user)
[WebMethodAttribute]
public virtual int AddUserToList(
    Guid listId,
    MailingListUserData user
)
[WebMethodAttribute]
public:
virtual int AddUserToList(
    Guid listId, 
    MailingListUserData^ user
)
public function AddUserToList(
    listId : Guid, 
    user : MailingListUserData
) : int

Parameters

  • user
    Type: MailingListUserData
    User to be added to the mailing list.

Return Value

Type: System..::.Int32
The new size of the mailing list, with the added user.

Exceptions

Exception Condition
EntityDoesNotExistException

The listId being updated does not exist.

DuplicateEntityIdException

User already exists in list.

EntityStateException

List is not available.

DatabaseIntegrityException

A serious integrity issue with the database.

Remarks

Adds a user to a mailing list.

Permissions

See Also

Reference

MarketingWebService Class

MarketingWebService Members

Microsoft.CommerceServer.Marketing.WebService Namespace