CreateBaseCatalog Method (String, String, String, String, String, String, String, DateTime, DateTime)
Creates an instance of a BaseCatalog object containing the new catalog.
Namespace: Microsoft.CommerceServer.Catalog
Assembly: Microsoft.CommerceServer.Catalog (in Microsoft.CommerceServer.Catalog.dll)
Syntax
'Declaration
Public Function CreateBaseCatalog ( _
catalogName As String, _
productId As String, _
variantId As String, _
defaultLanguage As String, _
reportingLanguage As String, _
currency As String, _
weightMeasure As String, _
startDate As DateTime, _
endDate As DateTime _
) As BaseCatalog
'Usage
Dim instance As CatalogContext
Dim catalogName As String
Dim productId As String
Dim variantId As String
Dim defaultLanguage As String
Dim reportingLanguage As String
Dim currency As String
Dim weightMeasure As String
Dim startDate As DateTime
Dim endDate As DateTime
Dim returnValue As BaseCatalog
returnValue = instance.CreateBaseCatalog(catalogName, _
productId, variantId, defaultLanguage, _
reportingLanguage, currency, weightMeasure, _
startDate, endDate)
public BaseCatalog CreateBaseCatalog(
string catalogName,
string productId,
string variantId,
string defaultLanguage,
string reportingLanguage,
string currency,
string weightMeasure,
DateTime startDate,
DateTime endDate
)
public:
BaseCatalog^ CreateBaseCatalog(
String^ catalogName,
String^ productId,
String^ variantId,
String^ defaultLanguage,
String^ reportingLanguage,
String^ currency,
String^ weightMeasure,
DateTime startDate,
DateTime endDate
)
public function CreateBaseCatalog(
catalogName : String,
productId : String,
variantId : String,
defaultLanguage : String,
reportingLanguage : String,
currency : String,
weightMeasure : String,
startDate : DateTime,
endDate : DateTime
) : BaseCatalog
Parameters
- catalogName
Type: System..::.String
The catalog name. Should not be nullNothingnullptra null reference (Nothing in Visual Basic).
- productId
Type: System..::.String
The property to use as the product identifying property for the base catalog. Should not be nullNothingnullptra null reference (Nothing in Visual Basic).
- variantId
Type: System..::.String
The property to use as the variant identifying property for the base catalog.
- defaultLanguage
Type: System..::.String
The culture code indicating the default language for the catalog. Should not be nullNothingnullptra null reference (Nothing in Visual Basic).
- reportingLanguage
Type: System..::.String
The reporting language for the catalog. The language to export to the data warehouse.
- currency
Type: System..::.String
The currency for the catalog, expressed as a three letter ISO 4217 currency code. For example, USD, AUD, CDN, GBP, DEM, JPY.
- weightMeasure
Type: System..::.String
The weight measure for the catalog.
- startDate
Type: System..::.DateTime
The start date for the catalog. The date the catalog is valid.
- endDate
Type: System..::.DateTime
The end date for the catalog. The date the catalog validity expires.
Return Value
Type: Microsoft.CommerceServer.Catalog..::.BaseCatalog
A BaseCatalog containing information about the catalog.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The catalogName, productId or defaultLanguage is nullNothingnullptra null reference (Nothing in Visual Basic). |
ValidationException | One of the input parameters is invalid. |
InvalidPropertyTypeException | The productId or variantId cannot be used as an identifying property. |
InvalidCatalogOperationException | The productId cannot be the same as variantId. |
EntityDoesNotExistException | The productId property or variantId property does not exist. |
EntityAlreadyExistsException | The catalogName already exists in the catalog system. |
NotAuthorizedException | The caller is not authorized to perform this operation. |
Remarks
The language is specified as a RFC 1766 CultureInfo class name. If nullNothingnullptra null reference (Nothing in Visual Basic), the language defaults to the current user interface culture. The defaultLanguage is the language that appears when you open the catalog to view it or edit it. The reportingLanguage is the language that will appear on reports.
This method creates a new base catalog in the catalog system and returns a BaseCatalog object. You can call methods on the BaseCatalog object to access and set information on the catalog. If you make changes to the BaseCatalog object you should call the Save method to save the changes to the catalog system.
The catalogName should:
Not be nullNothingnullptra null reference (Nothing in Visual Basic) or blank.
Not exceed 85 characters.
Not contain the .,"[]'()# characters.
The productId 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.
Exist in the catalog system.
Have one of the Integer, BigInteger, Double or String data types.
If specified the variantId 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.
Exist in the catalog system.
Not be the same as the productId.
Have one of the Integer,BigInteger, Double or String data types.
The defaultLanguage should:
Not be nullNothingnullptra null reference (Nothing in Visual Basic) or blank.
Not exceed 10 characters.
Not contain the ,'[] characters.
If specified the reportingLanguage should:
Not exceed 10 characters.
Not contain the ,'[] characters.
If the reportingLanguage is not specified then the reportingLanguage will be the same as the defaultLanguage.
The use of special characters in catalogName is not recommended and unsupported. If you prefer to use special characters, they may be used in the catalog display name.
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.