|
Home > Archive > Commerce Server General > October 2006 > How to update Address_List !!
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
How to update Address_List !!
|
|
|
| What's the best and simplest way to add newly user-defined address & credit
card profile to the (address_list & credit card list) property definition.
for example:
Say I have a user profile called: Prof.
Assigning the values like the following way is not (well professional to say
the least)
Prof["GeneralInfo.address_list"].value = address_profile_count + ";" +
address_profile1_guid + ";" +address_profile2_guid + ";" +
address_profile3_guid; // this is like using a string builder class to create
an .xml file
I am sure there is a more (professional) way of doing this, probably a
method that uses ProfileCollection, but I am not sure what that method is nor
how to use it.
I can assign the addresses to the address list from the "Customers & Orders
Manager" but I want to do so programmatically.
Thanks
| |
| David Hargis [MSFT] 2006-10-13, 7:33 pm |
| You should not set the value to a semicolon-delimited list. This format is
an implementation detail that exists because profiles can be aggregated
across SQL and AD data sources. To correctly assign the list, set the
property to an object of type object[]:
List<object> addresses = new List<object>();
addresses.Add(addressID1);
addresses.Add(addressID2);
addresses.Add(addressID3);
profile["GeneralInfo.address_list"].Value = addresses.ToArray();
profile.Update();
- David
--------------------
Thread-Topic: How to update Address_List !!
thread-index: Acbt9atmY9R+tF/1Saa5y6GB60Rm1Q==
X-WBNR-Posting-Host: 212.165.130.186
From: =?Utf-8?B?U3RldmU=?= <Steve@discussions.microsoft.com>
Subject: How to update Address_List !!
Date: Thu, 12 Oct 2006 04:58:02 -0700
Lines: 23
Message-ID: <B9B479F0-45D4-4DD0-8B37-A2BB9784E673@microsoft.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.1830
Newsgroups: microsoft.public.commerceserver.general
Path: TK2MSFTNGXA01.phx.gbl
Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.commerceserver.general:18676
NNTP-Posting-Host: TK2MSFTNGXA01.phx.gbl 10.40.2.250
X-Tomcat-NG: microsoft.public.commerceserver.general
What's the best and simplest way to add newly user-defined address & credit
card profile to the (address_list & credit card list) property definition.
for example:
Say I have a user profile called: Prof.
Assigning the values like the following way is not (well professional to
say
the least)
Prof["GeneralInfo.address_list"].value = address_profile_count + ";" +
address_profile1_guid + ";" +address_profile2_guid + ";" +
address_profile3_guid; // this is like using a string builder class to
create
an .xml file
I am sure there is a more (professional) way of doing this, probably a
method that uses ProfileCollection, but I am not sure what that method is
nor
how to use it.
I can assign the addresses to the address list from the "Customers & Orders
Manager" but I want to do so programmatically.
Thanks
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.
|
|
|
|
|