ICategory3::get_PrimaryParent, put_PrimaryParent Property [C++]

The PrimaryParent property is a read/write String that contains the primary parent category.

Definition

[C++]

Get method:

HRESULT ICategory3::get_PrimaryParent(BSTR*PrimaryParent);

Put method:

HRESULT ICategory3::put_PrimaryParent(BSTRPrimaryParent);

[Visual Basic]

Property PrimaryParent As String

Parameters

  • PrimaryParent[C++]
    [in] When putting the property, a BSTR that contains the primary parent.
    [out, retval] When getting the property, a BSTR used to return the primary parent.

[Visual Basic] None.

[C++]

Return Values

These methods return an HRESULT indicating whether they completed successfully. See the Error Values section for more details.

Error Values

[C++] These methods return S_OK (0x00000000) to indicate success and standard COM HRESULT error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object, which can be accessed using the API function GetErrorInfo. In particular, the GetDescription method of the IErrorInfo interface may return a text description of the error.

[Visual Basic] This property sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to standard COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.

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

Constant Value Description
E_CAT_INVALID_OPERATION_FOR_ROOT_CATEGORY

[C++] 0x889800F8

[Visual Basic] &H889800F8

This API cannot be called for a root category.
E_CAT_VC_NOT_A_SUPPLIER_CATALOG

[C++] 0x889800F9

[Visual Basic] &H889800F9

Invalid catalog type. This API can only be called on a base catalog.
E_CAT_PRODUCT_DOESNT_EXIST

[C++] 0x8898001E

[Visual Basic] &H8898001E

The product you specified doesn't exist.
E_CAT_PRIMARYPARENT_DOES_NOT_EXIST

[C++] 0x889800AC

[Visual Basic] &H889800AC

The primary parent category that you specified does not exist
E_CAT_INVALID_RELATION

[C++] 0x88980039

[Visual Basic] &H88980039

An invalid relation is specified. Self relations are not supported.
E_CAT_PRICING_CAT_PRICELESS

[C++] 0x8898002F

[Visual Basic] &H8898002F

The category you specified has no list price. The list price of the category has to be set before using this for pricing.
E_CAT_CATEGORY_DOESNT_EXIST

[C++] 0x8898001C

[Visual Basic] &H8898001C

The category you specified doesn't exist.
E_CAT_VC_ERROR_IN_PROPAGATING_BC_CHANGES

[C++] 0x88980101

[Visual Basic] &H88980101

There was an error in propagating the base catalog changes to the dependent virtual catalogs.

Remarks

Products and categories can have multiple parent-child relationships. Specifying a primary parent for a product or category simplifies the hierarchy and clarifies the application of pricing rules. If there is no primary parent this property contains an empty string.

Ee823918.note(en-US,CS.20).gifNote

  • This property cannot be modified in a virtual catalog. Inherited hierarchy and relationship links cannot be removed or changed in inherited categories. To modify inherited relationships use a Category object obtained from the base Catalog object.

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

See Also

[C++]Category Object

[Visual Basic]Category Object

Copyright © 2005 Microsoft Corporation.
All rights reserved.