CatalogManager.RemoveDefinitionProperty

Ee824873.c++_on(en-US,CS.10).gifEe824873.vb_off(en-US,CS.10).gif

Use this method to remove the specified property or variant property from the specified definition.

Definition

Sub RemoveDefinitionProperty(strDefinitionName As String,strPropertyName As String)

Parameters

strDefinitionName

A String that contains the name of the definition for which the specified property will be removed.

strPropertyName

A String that contains the name of the property to be removed.

Return Values

None.

Error Values

This method sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to either standard or custom COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors.

The following table shows the custom COM errors that this method can return.

Constant Value Description
E_CAT_DEFINITION_DOESNT_EXIST &H8898000B The specified definition did not exist.
E_CAT_PROP_NOT_IN_DEFINITION &H8898000E The specified property was not included in this definition.

Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.

Remarks

When you remove a property from a definition, it is also removed from any products, product-variants, or categories created from that definition.

For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.

Ee824873.note(en-US,CS.10).gifCaution

  • Use caution when using this method. In most cases, calling this method results in the deletion of data.

  • Removing the last variant property in a product family definition will convert it to a product definition and will remove all existing product variants based on this definition.

Example

myCatalogManager.RemoveDefinitionProperty "T-Shirts", "Color"

See Also

CatalogManager Object

CatalogManager.AddDefinitionProperty

CatalogManager.AddDefinitionVariantProperty

CatalogManager.GetDefinitionProperties


All rights reserved.