CreateSiteTerm Method
Creates a new site term in the server.
Namespace: Microsoft.CommerceServer.Profiles
Assembly: Microsoft.CommerceServer.Profiles.CrossTierTypes (in Microsoft.CommerceServer.Profiles.CrossTierTypes.dll)
Syntax
'Declaration
Public Sub CreateSiteTerm ( _
siteTermXml As XmlElement _
)
'Usage
Dim instance As ProfileManagementContext
Dim siteTermXml As XmlElement
instance.CreateSiteTerm(siteTermXml)
public void CreateSiteTerm(
XmlElement siteTermXml
)
public:
void CreateSiteTerm(
XmlElement^ siteTermXml
)
public function CreateSiteTerm(
siteTermXml : XmlElement
)
Parameters
- siteTermXml
Type: System.Xml..::.XmlElement
XML representing the site term to create.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | Any of the parameters provided is nullNothingnullptra null reference (Nothing in Visual Basic). |
AuthenticationException | User has not been authenticated. |
NotAuthorizedException | User is not authorized to perform this task. |
DuplicateSiteTermNameException | A site term with the specified name or display name already exists. |
DuplicateSiteTermValueException | The site term contains duplicate values. |
StringLengthValidationException | A string property specified in profileXml is greater than 8,000 characters, or within the constraints specified by the MinLength and MaxLength profile definition custom attribute. |
XmlException | The siteTermXml provided is not correctly formatted. |
Remarks
SiteTerms created through this API will always be created at the root level (i.e. no group membership).
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
ProfileManagementContext Class