Discussion:
Problems extending the user profile (Commerce Server 2009 newbie)
(too old to reply)
Edward Aschan
2009-06-23 16:04:01 UTC
Permalink
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?
Glen Smith
2009-06-25 09:56:48 UTC
Permalink
Hi Edward,

You won't get much response here. This forum has moved to
http://social.msdn.microsoft.com/Forums/en-US/commserver2009/threads

Hope this helps

Glen (Software) Smith
CS 2009 Training: www.software-smith.com
CS 2007 Book: www.software-smith.com/csbook
Post by Edward Aschan
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?
Edward Aschan
2009-06-25 11:18:01 UTC
Permalink
Thanks for the info Glen! I managed to solve the problem myself but I'll post
a blog detailing how it was done.

//E
Post by Glen Smith
Hi Edward,
You won't get much response here. This forum has moved to
http://social.msdn.microsoft.com/Forums/en-US/commserver2009/threads
Hope this helps
Glen (Software) Smith
CS 2009 Training: www.software-smith.com
CS 2007 Book: www.software-smith.com/csbook
Post by Edward Aschan
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?
sankar
2009-09-24 08:44:15 UTC
Permalink
Hi Edward,

I am also having the same problem. Could you please give me the code to
solve the issue?

Thanks in advance
Sankar

url:http://www.ureader.com/msg/126420.aspx

Loading...