IProductCatalog::GenerateCustomCatalog

Ee796983.c++_off(en-US,CS.10).gifEe796983.vb_on(en-US,CS.10).gif

Use this method to populate a custom catalog with data or to update a custom catalog to reflect the latest version of the base catalog. A copy of the base catalog is made and custom prices and rules are applied to generate the custom catalog.

Definition

HRESULT IProductCatalog::GenerateCustomCatalog(BSTRstrCustomCatalogName);

Parameters

strCustomCatalogName

[in] A BSTR that contains the custom catalog name.

Return Values

This method returns an HRESULT indicating whether it completed successfully. See the Error Values section for more details.

Error Values

This method returns S_OK (0x00000000) to indicate success and either standard or custom COM HRESULT error values to indicate failure. For more information about standard COM errors, see Standard COM Errors.

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

Constant Value Description
E_CAT_CUSTOMCAT_DOESNT_EXIST 0x88980024 The specified custom catalog did not exist.

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.

Remarks

Use this method to populate a custom catalog template with data. If the custom catalog already exists then the existing data will be deleted. The generated custom catalog is a copy of the base catalog at the moment when it is populated by this method. The prices of the products in the custom catalog are determined by applying the custom pricing rule that has been set with the SetCategoryCustomPrice method. After the custom catalog has been generated by this method, the custom catalog can be treated as any other catalog.

Because custom catalogs are only copies of an existing base catalog, and are not dynamically linked to the base catalog, any changes made to the base catalog will not be automatically reflected in any custom catalogs derived from it. Similarly, any changes made to a custom catalog will not automatically propagate back to the base catalog. Use this method to update the custom catalog to reflect the latest version of the base catalog.

Ee796983.note(en-US,CS.10).gif Note

  • This method cannot be called in a transacted object. This method involves the creation, deletion, or updating of free text indexes. SQL Server does not allow these operations in a transaction.

See Also

ProductCatalog Object

IProductCatalog::CreateCustomCatalog

IProductCatalog::DeleteCustomCatalog

IProductCatalog::SetCategoryCustomPrice


All rights reserved.