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.
Deletes the property from the Catalog System.
Namespace: Microsoft.CommerceServer.Catalog
Assembly: Microsoft.CommerceServer.Catalog (in Microsoft.CommerceServer.Catalog.dll)
Syntax
'Declaration
Public Sub DeleteProperty ( _
propertyName As String _
)
'Usage
Dim instance As CatalogContext
Dim propertyName As String
instance.DeleteProperty(propertyName)
public void DeleteProperty(
string propertyName
)
public:
void DeleteProperty(
String^ propertyName
)
public function DeleteProperty(
propertyName : String
)
Parameters
- propertyName
Type: System..::.String
The name of the property to delete. Should not be nullNothingnullptra null reference (Nothing in Visual Basic).
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The propertyName is nullNothingnullptra null reference (Nothing in Visual Basic). |
ValidationException | The propertyName is invalid. |
NotAuthorizedException | The caller is not authorized to perform this operation. |
EntityDoesNotExistException | The propertyName does not exist in the catalog system. |
EntityInUseException | The propertyName is being used in one or more definitions or is being used as a product or variant identifying property in one or more catalogs. |
Remarks
Use this method to delete a property from the Product Catalog System. The property will not be deleted if it is being used in one or more definitions or is being used as a product or variant identifying property in one or more catalogs. You should first remove the property from the existing definitions and then delete the property.
The propertyName should:
Not be nullNothingnullptra null reference (Nothing in Visual Basic) or blank.
Not exceed 100 characters.
Not contain the .,"[] characters.
Not begin with a digit.
Examples
This example shows how to delete a property.
private void DeleteProperty(CatalogContext catalogContext)
{
catalogContext.DeleteProperty("PropertyName");
}
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.