Edward Aschan
2009-06-23 16:04:01 UTC
I have extended the user profile with a custom string property "MobilePhone"
and everything seem to be working fine until I create a UserProfile entity in
my web application and try to store that object. The message is "Failed to
retrieve profile property 'MobilePhone'."
I have done the basic tasks; added a column in the profiles table, updated
my User Object with a data member and updated the Profile Definition with a
property connected to the new data member. I also updated
PresentationInfo.xml just to make sure that the new property is visible in
Customer and Orders Manager. So far so good.
I have created a UserProfile enitity that inherits from ICommerceEntity
where all my properties are defined. Creating an instance works fine as does
assigning values to the properties. Yet trying to store the UserProfile
entity renders the "Failed to retrieve profile property" message.
My first thought was that I needed a translator similar to inheriting
Microsoft.CommerceServer.Runtime.Orders.LineItem and
Microsoft.Commerce.Providers.Translators.LineItemTranslator in order to add
properties to the runtime object and and custom translations to support the
custom LineItem. Unfourtunately the
Microsoft.CommerceServer.Runtime.Profiles.Profile is a sealed class so I can
not add properties to it.
The question that remains is; if the above doesn't work then how should I
make my custom properties available in code so that they can be manipulated
from the web application and the information persisted correctly?
and everything seem to be working fine until I create a UserProfile entity in
my web application and try to store that object. The message is "Failed to
retrieve profile property 'MobilePhone'."
I have done the basic tasks; added a column in the profiles table, updated
my User Object with a data member and updated the Profile Definition with a
property connected to the new data member. I also updated
PresentationInfo.xml just to make sure that the new property is visible in
Customer and Orders Manager. So far so good.
I have created a UserProfile enitity that inherits from ICommerceEntity
where all my properties are defined. Creating an instance works fine as does
assigning values to the properties. Yet trying to store the UserProfile
entity renders the "Failed to retrieve profile property" message.
My first thought was that I needed a translator similar to inheriting
Microsoft.CommerceServer.Runtime.Orders.LineItem and
Microsoft.Commerce.Providers.Translators.LineItemTranslator in order to add
properties to the runtime object and and custom translations to support the
custom LineItem. Unfourtunately the
Microsoft.CommerceServer.Runtime.Profiles.Profile is a sealed class so I can
not add properties to it.
The question that remains is; if the above doesn't work then how should I
make my custom properties available in code so that they can be manipulated
from the web application and the information persisted correctly?