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.
This Commerce Server 2009 commerce entity is used to store information for a single address.
Model
This commerce entity can be modified, as required. This model, taken from the out-of-the-box site, is provided as an example.
<CommerceEntity name="Address">
<DisplayName value="Address">
<LanguageSpecific value="fr: Address" language="fr-CA"/>
</DisplayName>
<Description value="User Address">
<LanguageSpecific value="fr: User Address" language="fr-CA"/>
</Description>
<EntityMappings>
<EntityMapping csType="Microsoft.CommerceServer.Runtime.Orders.OrderAddress" csAssembly="Microsoft.CommerceServer.Runtime, Version=6.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" csArea="Orders">
<PropertyMappings>
<PropertyMapping property="Id" csProperty="OrderAddressId"/>
<PropertyMapping property="AddressName" csProperty="Name"/>
<PropertyMapping property="CountryRegionCode" csProperty="CountryCode"/>
<PropertyMapping property="CountryRegionName" csProperty="CountryName"/>
<PropertyMapping property="Telephone" csProperty="DaytimePhoneNumber"/>
<PropertyMapping property="StateProvinceCode" csProperty="RegionCode"/>
<PropertyMapping property="StateProvinceName" csProperty="RegionName"/>
<PropertyMapping property="ZipPostalCode" csProperty="PostalCode"/>
<PropertyMapping property="TestField" csProperty="TestField"/>
</PropertyMappings>
</EntityMapping>
<EntityMapping csType="Microsoft.CommerceServer.Runtime.Profiles.Profile" csAssembly="Microsoft.CommerceServer.Runtime, Version=6.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" csDefinitionName="Address" csArea="Profiles">
<PropertyMappings>
<PropertyMapping property="AdapterLastChangedDate" csProperty="ProfileSystem.csadapter_date_last_changed" />
<PropertyMapping property="AddressName" csProperty="GeneralInfo.address_name" />
<PropertyMapping property="AddressType" csProperty="GeneralInfo.address_type" />
<PropertyMapping property="City"csProperty="GeneralInfo.city" />
<PropertyMapping property="CountryRegionCode" csProperty="GeneralInfo.country_code" />
<PropertyMapping property="CountryRegionName" csProperty="GeneralInfo.country_name" />
<PropertyMapping property="DateCreated" csProperty="ProfileSystem.date_created" />
<PropertyMapping property="DateModified" csProperty="ProfileSystem.date_last_changed" />
<PropertyMapping property="Description" csProperty="GeneralInfo.description" />
<PropertyMapping property="FirstName" csProperty="GeneralInfo.first_name" />
<PropertyMapping property="Id" csProperty="GeneralInfo.address_id" />
<PropertyMapping property="LastName" csProperty="GeneralInfo.last_name" />
<PropertyMapping property="Line1" csProperty="GeneralInfo.address_line1" />
<PropertyMapping property="Line2" csProperty="GeneralInfo.address_line2" />
<PropertyMapping property="LocaleId" csProperty="GeneralInfo.locale" />
<PropertyMapping property="ModifiedBy" csProperty="ProfileSystem.user_id_changed_by" />
<PropertyMapping property="StateProvinceCode" csProperty="GeneralInfo.region_code" />
<PropertyMapping property="StateProvinceName" csProperty="GeneralInfo.region_name" />
<PropertyMapping property="Telephone" csProperty="GeneralInfo.tel_number" />
<PropertyMapping property="TelephoneExtension" csProperty="GeneralInfo.tel_extension" />
<PropertyMapping property="ZipPostalCode" csProperty="GeneralInfo.postal_code" />
</PropertyMappings>
</EntityMapping>
</EntityMappings>
<Properties>
<Property name="City" dataType="String">
<DisplayName value="City">
<LanguageSpecific value="fr: City" language="fr-CA"/>
</DisplayName>
<Description value="City Name">
<LanguageSpecific value="fr: City Name" language="fr-CA"/>
</Description>
<Constraints>
<RequiredProperty>
<Message value="City is required">
<LanguageSpecific value="fr: City is required" language="fr-CA"/>
</Message>
</RequiredProperty>
<Range minValue="0" minBoundaryType="Include" maxValue="64" maxBoundaryType="Include">
<Message value="City length must be within the defined range.">
<LanguageSpecific value="fr: City length must be within the defined range." language="fr-CA"/>
</Message>
</Range>
</Constraints>
</Property>
<Property name="Telephone" dataType="String" >
<DisplayName value="Telephone number">
<LanguageSpecific value="fr: Telephone number" language="fr-CA"/>
</DisplayName>
<Description value="Day time phone number">
<LanguageSpecific value="fr: Telephone number" language="fr-CA"/>
</Description>
<Constraints>
<RegularExpression>
<Message value="Telephone must be in the following format: (614)555-1212.">
<LanguageSpecific value="fr: Telephone must be in the following format: (614)555-1212." language="fr-CA"/>
</Message>
<Pattern value="^([\(]{1}[0-9]{3}[\)]{1}[\.| |\-]{0,1}|^[0-9]{3}[\.|\-| ]?)?[0-9]{3}(\.|\-| )?[0-9]{4}$" />
</RegularExpression>
</Constraints>
</Property>
<Property name="TestField" dataType="String" />
</Properties>
</CommerceEntity>
Properties
Property |
Type |
Description |
---|---|---|
AdapterLastChangedDate |
DateTime? |
Use for BizTalk adapter functionality. |
AddressName |
String |
Friendly name for this address (such as Work, Home, and so on). |
AddressType |
int? |
Type of address (such as Work, Home, Billing, and so on). |
City |
String |
Name of the city (such as Ottawa) for this address. |
CountryRegionCode |
String |
Country code (such as CA for Canada) for this address. |
CountryRegionName |
String |
Name of the country (such as Canada) for this address. |
DateCreated |
DateTime? |
Date the address was created. |
DateModified |
DateTime? |
Date the address was last modified. |
Description |
String |
Textual description for this address. |
FirstName |
String |
First name of the user for this address. |
Id |
String |
ID of the address. |
LastName |
String |
Last name of the user for this address. |
Line1 |
String |
First line of this address. |
Line2 |
String |
Second line of this address. |
LocaleId |
int? |
Locale Id used to render this address. |
ModifiedBy |
String |
User that last modified the address. |
StateProvinceCode |
String |
State or province code (such as ON for Ontario) for this address. |
StateProvinceName |
String |
Name for the state or province (such as Ontario) for this address. |
Telephone |
String |
Telephone number for this address. |
TelephoneExtension |
String |
Telephone extension for this address. |
TestField |
String |
Test field for this address. |
ZipPostalCode |
String |
Zip or Postal Code for this address. |
Relationships
None.
Supported Operations
Commerce Foundation Basket CommerceQuery
Commerce Foundation Basket CommerceUpdate
Commerce Foundation UserProfile CommerceCreate
Commerce Foundation UserProfile CommerceQuery
Commerce Foundation UserProfile CommerceUpdate