Content Studio Web Content Management System
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Guid that identifies the added or updated subscription.
For Newsletter subscriptions, this method can successfully be executed by any authenticated or anonymous caller.
[This is preliminary documentation and is subject to change.]
Adds or updates a subscription on a subscribable category.
Namespace: ContentStudio.Document.Subscription
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax
public Guid SubscriptionAddOrSave( ConnectionId connectionId, SessionId sessionId, Guid subscriptionDefinitionId, string subscriberName, string subscriberAddress, SubscriberAddressType subscriberAddressType, string externalMembershipProviderName, Object externalSubscriberIdentifier, bool allowUpdateOfExisting )
Parameters
- connectionId
- Type: ContentStudioConnectionId
A value that identifies the web site - sessionId
- Type: ContentStudio.SecuritySessionId
A value that identifies the user's session. This value usually originates from a call to OpenSession(ConnectionId). Anonymous subscriptions are supported, in that case, pass CS_ANONYMOUS_SESSION_IDENTIFIER. - subscriptionDefinitionId
- Type: SystemGuid
The subscription definition id. - subscriberName
- Type: SystemString
Name of the subscriber to add or update. This parameter cannot be null and cannot exceed MaxSubscriberNameDataLength characters in length. - subscriberAddress
- Type: SystemString
The subscriber address. If this address exists the subscription will be update otherwise a new subscription will be added. This parameter cannot be null and cannot exceed MaxSubscriberAddressDataLength characters in length. - subscriberAddressType
- Type: ContentStudio.Document.SubscriptionSubscriberAddressType
Type of the subscriber address. - externalMembershipProviderName
- Type: SystemString
The name of the external membership provider used to verify this subscriber. This value can be null (Nothing in Visual Basic) if no MembershipProvider is used, but cannot exceed MaxSubscriberProviderDataLength characters in length. - externalSubscriberIdentifier
- Type: SystemObject
An identifier to the users account in the the external membership provider used to verify this subscriber. This value can be null (Nothing in Visual Basic) if no MembershipProvider is used. - allowUpdateOfExisting
- Type: SystemBoolean
Specifies whether the subscriberName, externalMembershipProviderName and externalSubscriberIdentifier will be updated if a subscription with the address specified already exists.
Return Value
Type: GuidGuid that identifies the added or updated subscription.
Exceptions
Exception | Condition | ||||||
---|---|---|---|---|---|---|---|
CSException |
| ||||||
CSPermissionDeniedException | The caller has no permission to perform the requested action | ||||||
CSInvalidSessionException | The session is invalid | ||||||
NotSupportedException | The value of subscriberAddressType parameter is not supported. | ||||||
SqlException | An error occurred when executing the command against the Content Studio database |
Content Studio permissions
Remarks
Note |
---|
This method is new in Content Studio 5.2 |
See Also