How to update Address_List !!
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Microsoft Commerce Server > Commerce Server General > How to update Address_List !!




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    How to update Address_List !!  
Steve


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-12-06 06:25 PM

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 creat
e
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 no
r
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






[ Post a follow-up to this message ]



    RE: How to update Address_List !!  
David Hargis [MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-14-06 12:33 AM

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: examnotes <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.



Attachment:
This has been downloaded 0 time(s).



[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 06:13 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register