Customer Address Mass Delete

Hi,

After an data migration, I need to delete all the customer addresses. How 
can I do it without mass delete the accounts ?

Thanks,
Hugo
0
Utf
1/7/2005 6:59:06 PM
crm 35858 articles. 1 followers. Follow

5 Replies
524 Views

Similar Articles

[PageSpeed] 45

In SQL query analyser run following statement against your MSCRM database:-

DELETE CustomerAddressBase

Not supported, but it works

Peter Lynch


"Hugo Fonseca" <HugoFonseca@discussions.microsoft.com> wrote in message 
news:983A60F1-22C2-45A8-83C3-19E68AF8906A@microsoft.com...
> Hi,
>
> After an data migration, I need to delete all the customer addresses. How
> can I do it without mass delete the accounts ?
>
> Thanks,
> Hugo 


0
Peter
1/7/2005 7:17:15 PM
:)

Ok but that will leave garbage or hanging records in the MS CRM. It will not 
propagate the mass delete.

Maybe it could be a way to invoke the same delete function that it called 
when using the SFO or the browser, for all customer address's.

Does anyone know other options?

Thanks,
Hugo

"Peter Lynch" wrote:

> In SQL query analyser run following statement against your MSCRM database:-
> 
> DELETE CustomerAddressBase
> 
> Not supported, but it works
> 
> Peter Lynch
> 
> 
> "Hugo Fonseca" <HugoFonseca@discussions.microsoft.com> wrote in message 
> news:983A60F1-22C2-45A8-83C3-19E68AF8906A@microsoft.com...
> > Hi,
> >
> > After an data migration, I need to delete all the customer addresses. How
> > can I do it without mass delete the accounts ?
> >
> > Thanks,
> > Hugo 
> 
> 
> 
0
Utf
1/7/2005 7:29:05 PM
The thing is, the address1 & address2 records are created for every customer
regardless of whether there are values in them or not.  These are the address
values that are available on the main Contact or Account page.  These should not
be deleted or it can cause problems if you use the SFO client in offline mode.

The safe way to do this would be the following:

1) delete from CustomerAddressBase where AddressNumber > 2

This will remove an of the "More Addresses" records.  If you are concerned about
direct deletes, you could always replcae this with an update of the
DeletionStateCode = 2 which is what the front end does, but the direct delete in
this case is safe as there aren't any dependant records to the address.  After
all, the front-end just sets the DeletionStateCode, the DeletionService will
come along and do the delete for you.

2) Then, rather than delete the AddressNumber 1 & 2 records, I would just update
the adddress fields on these to NULL.

Matt Parks
MVP - Microsoft CRM

----------------------------------------
----------------------------------------
On Fri, 7 Jan 2005 11:29:05 -0800, Hugo Fonseca
<HugoFonseca@discussions.microsoft.com> wrote:

:)

Ok but that will leave garbage or hanging records in the MS CRM. It will not 
propagate the mass delete.

Maybe it could be a way to invoke the same delete function that it called 
when using the SFO or the browser, for all customer address's.

Does anyone know other options?

Thanks,
Hugo

"Peter Lynch" wrote:

> In SQL query analyser run following statement against your MSCRM database:-
> 
> DELETE CustomerAddressBase
> 
> Not supported, but it works
> 
> Peter Lynch
> 
> 
> "Hugo Fonseca" <HugoFonseca@discussions.microsoft.com> wrote in message 
> news:983A60F1-22C2-45A8-83C3-19E68AF8906A@microsoft.com...
> > Hi,
> >
> > After an data migration, I need to delete all the customer addresses. How
> > can I do it without mass delete the accounts ?
> >
> > Thanks,
> > Hugo 
> 
> 
> 

0
Matt
1/7/2005 11:31:12 PM
Thanks Matt, didnt knew about the DeletionStateCode! It's available for all 
entities?

I deleted all the Accounts, and remapped the DTS to include the 1st 2 
addresses in the migration of the Accounts.

All the best,
Hugo 

"Matt Parks" wrote:

> The thing is, the address1 & address2 records are created for every customer
> regardless of whether there are values in them or not.  These are the address
> values that are available on the main Contact or Account page.  These should not
> be deleted or it can cause problems if you use the SFO client in offline mode.
> 
> The safe way to do this would be the following:
> 
> 1) delete from CustomerAddressBase where AddressNumber > 2
> 
> This will remove an of the "More Addresses" records.  If you are concerned about
> direct deletes, you could always replcae this with an update of the
> DeletionStateCode = 2 which is what the front end does, but the direct delete in
> this case is safe as there aren't any dependant records to the address.  After
> all, the front-end just sets the DeletionStateCode, the DeletionService will
> come along and do the delete for you.
> 
> 2) Then, rather than delete the AddressNumber 1 & 2 records, I would just update
> the adddress fields on these to NULL.
> 
> Matt Parks
> MVP - Microsoft CRM
> 
> ----------------------------------------
> ----------------------------------------
> On Fri, 7 Jan 2005 11:29:05 -0800, Hugo Fonseca
> <HugoFonseca@discussions.microsoft.com> wrote:
> 
> :)
> 
> Ok but that will leave garbage or hanging records in the MS CRM. It will not 
> propagate the mass delete.
> 
> Maybe it could be a way to invoke the same delete function that it called 
> when using the SFO or the browser, for all customer address's.
> 
> Does anyone know other options?
> 
> Thanks,
> Hugo
> 
> "Peter Lynch" wrote:
> 
> > In SQL query analyser run following statement against your MSCRM database:-
> > 
> > DELETE CustomerAddressBase
> > 
> > Not supported, but it works
> > 
> > Peter Lynch
> > 
> > 
> > "Hugo Fonseca" <HugoFonseca@discussions.microsoft.com> wrote in message 
> > news:983A60F1-22C2-45A8-83C3-19E68AF8906A@microsoft.com...
> > > Hi,
> > >
> > > After an data migration, I need to delete all the customer addresses. How
> > > can I do it without mass delete the accounts ?
> > >
> > > Thanks,
> > > Hugo 
> > 
> > 
> > 
> 
> 
0
Utf
1/10/2005 1:21:02 AM
Hugo,

I don't recall running intoa table yet that does NOT have the DeletionStateCode.
That is the mechanism used for deletes, they just update that field.  The
platform ignores these records.

The key to watch out for though is "related" records.  Thus, just setting the
flag on SalesOrderBase isn't enough, you also need to set it on te
SalesOrderDetail records for the order.

Matt Parks
MVP - Microsoft CRM

----------------------------------------
----------------------------------------
On Sun, 9 Jan 2005 17:21:02 -0800, Hugo Fonseca
<HugoFonseca@discussions.microsoft.com> wrote:

Thanks Matt, didnt knew about the DeletionStateCode! It's available for all 
entities?

I deleted all the Accounts, and remapped the DTS to include the 1st 2 
addresses in the migration of the Accounts.

All the best,
Hugo 

"Matt Parks" wrote:

> The thing is, the address1 & address2 records are created for every customer
> regardless of whether there are values in them or not.  These are the address
> values that are available on the main Contact or Account page.  These should not
> be deleted or it can cause problems if you use the SFO client in offline mode.
> 
> The safe way to do this would be the following:
> 
> 1) delete from CustomerAddressBase where AddressNumber > 2
> 
> This will remove an of the "More Addresses" records.  If you are concerned about
> direct deletes, you could always replcae this with an update of the
> DeletionStateCode = 2 which is what the front end does, but the direct delete in
> this case is safe as there aren't any dependant records to the address.  After
> all, the front-end just sets the DeletionStateCode, the DeletionService will
> come along and do the delete for you.
> 
> 2) Then, rather than delete the AddressNumber 1 & 2 records, I would just update
> the adddress fields on these to NULL.
> 
> Matt Parks
> MVP - Microsoft CRM
> 
> ----------------------------------------
> ----------------------------------------
> On Fri, 7 Jan 2005 11:29:05 -0800, Hugo Fonseca
> <HugoFonseca@discussions.microsoft.com> wrote:
> 
> :)
> 
> Ok but that will leave garbage or hanging records in the MS CRM. It will not 
> propagate the mass delete.
> 
> Maybe it could be a way to invoke the same delete function that it called 
> when using the SFO or the browser, for all customer address's.
> 
> Does anyone know other options?
> 
> Thanks,
> Hugo
> 
> "Peter Lynch" wrote:
> 
> > In SQL query analyser run following statement against your MSCRM database:-
> > 
> > DELETE CustomerAddressBase
> > 
> > Not supported, but it works
> > 
> > Peter Lynch
> > 
> > 
> > "Hugo Fonseca" <HugoFonseca@discussions.microsoft.com> wrote in message 
> > news:983A60F1-22C2-45A8-83C3-19E68AF8906A@microsoft.com...
> > > Hi,
> > >
> > > After an data migration, I need to delete all the customer addresses. How
> > > can I do it without mass delete the accounts ?
> > >
> > > Thanks,
> > > Hugo 
> > 
> > 
> > 
> 
> 

0
Matt
1/10/2005 3:31:36 PM
Reply:

Similar Artilces:

Name Matching
Hi when an email is sent to a miss-spelled address, how do I route these emails to a postmaster or admin account? Thanks Matt What version of Exchange? -- Neil Hobson Exchange MVP For Exchange news, links and tips, check: http://www.msexchange.co.uk "Matt" <mattremoveme@edirect.co.uk> wrote in message news:006001c3b506$6c6670f0$a301280a@phx.gbl... > Hi > > when an email is sent to a miss-spelled address, how do I > route these emails to a postmaster or admin account? > > Thanks > Matt Exchange Server 2003 Running on Windows Server 2003 >----...

Access Deleting a Query SQL
Hi all, I am working with a multiple parameter search query. The form I am using to conduct the search displays the results in a subform. I have gone through and really combed through the SQL to make sure there are no blatant spelling errors or incorrect references within the code. Anyways when I open the form that it is attached to, I keep getting the boxes described in this website http://allenbrowne.com/bug-13.html .. The form is open, and I even changed names of fields in the table in case SQL was choosing to be picky about what I named my fields. Is there anything else that would cau...

Deleting records in Access 2007 Runtime
I run my application in Access 2007 Runtime, but I can not delete any records. How can I delete records in Access 2007 Runtime? How can I make all the menus concerning data manipulation available in Access 2007 Runtime? The runtime is free but stripped-down version of access. The menus are one thing that are not available in the rutime. You will need to build your own menus to use in the runtime. Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia "alex" <alex@discussions.microsoft.com> wrote in message news:16B9B95A-327B-47B3-884D-7AA64D88AB3...

How to add another user's Contacts folder to my Address Book?
Background: Exchange 2003 Server w/ Outlook 2000/2003 clients. I can add any Contacts folders in my mailbox to my Address Book by going into the Properties of the folder and checking "Show this folder as an e-mail Address Book" on the "Outlook Address Book" tab. However, if I have another user's mailbox (to which I have full permission) in my Folder List, I do not have this option in any of their Contacts folders. How do I add another user's Contacts folder, displayed in my Folder List, to my Address Book? TIA, roshan After a bit of research on SlipStick.com...

Keep Added Custom Fields on New Projects
We are importing information from our bidding software. The export is created in XML file. We know the custom fields that are created. How do I make MS Project use the same "look" everytime? I want it to remember the custom fields I created and use that as my default blank project. I don't care about the tasks because those could be different every time. I just want to be able to create each project with the same columns every time. Create or update a view/table with the custom fields and layout you are wanting. Then change the Tools-->Options--View tab to ...

Is it possible to log the user's IP address or computer name?
We have Exchange 5.5 here and some users know other's email password. Is there anyway to log the machine IP address since under the property store you can only see the last logon with the user. Can't tell anything if multiple users sign on simultaneously? Lisa ...

Cannot Delete A Public Folder
Folks, For some reason I have run into a weird problem on a folder within our Public Folders. This folder is no longer in use and must be deleted, however, when I right click it in Outlook the option to delete is greyed out. The properties page is also screwed up because I cannot add users or permissions to it. I believe the root of my problem is because the one and only defined user for this particular left the company and his AD account was deleted. All I see as a permitted user/author is the SID string of numbers. Is there a way to delete this folder manually? I've look...

deleting CRM users??
Is there a way to delete the users from the users folder? It doesn't seem like you can get rid of them or change the groups that they belong to if you make a mistake, etc. You can't delete CRM users, you just have to disable them. "wlandymore" wrote: > Is there a way to delete the users from the users folder? It doesn't seem > like you can get rid of them or change the groups that they belong to if you > make a mistake, etc. Hi, It is possible to hard delete a users in the ms crm database, but of course this is not supported. If you chose to delete this...

delete data #2
Hello, we have CRM v3 installed in a test evironment. we have added test data for customers, products. we have created oppurtunities to invoices. we would like to delete all of this data. is there a way to do it without uninsalling and reinstalling the software? cheers, Michael. Try to delete via the UI from Advanced Find. For some of the object (Order, Invoices, Quote, etc.), depending on status some of these records cannot be deleted. Frank Lee, Microsoft CRM MVP http://microsoft-crm.spaces.live.com http://www.workopia.com/Links.htmTry "Michael P. Lindekugel" wrote:...

How to export address book from Outlook XP to Outlook Express?
Does anyone know how I can export my Address Book from Outlook to Outlook express? Outlook Address Book is a .pab file. In outlook express click on File / Import / Other address books / Select outlook .pab file and you should be all set. I hope this helps thanks! "Candice" <bowns_candice@hotmail.com> wrote in message news:00a101c3cfba$7878b870$a101280a@phx.gbl... > Does anyone know how I can export my Address Book from > Outlook to Outlook express? > > Candice <bowns_candice@hotmail.com> wrote: > Does anyone know how I can export my Address Book f...

Outlook does not refresh imap inbox when message is deleted on ser
I have Outlook set up to use imap on two computers as well as my Palm. The problem is that messages deleted from the server will not dissappear in Outlook as long as Outlook is running. If if restart Outlook the imap inbox is updated correctly. I thougt Microsoft had solved this problem between Outlook 2000 and 2003, but obviously not. Is there a solution? You will need to manually purge the items using Edit->Purge. (I think it is on the Edit menu - I despise IMAP so I don't have a current setup to check.) --� Milly Staples [MVP - Outlook] Post all replies to the group to keep ...

Re: Server address
When i set up my server account i put yahoo.com and i have Verizon for my internet provider. I can't send my resume from yahoo cause i get an error message. You can't access Yahoo POP3 accounts unless you have the Plus account. -- Dave N. MS-MVP (Mail) Windows 7 Ultimate http://download.live.com/wlmail "Donna Lomagro" <purpletulips65@yahoo.com> wrote in message news:ucQmttlvKHA.5812@TK2MSFTNGP02.phx.gbl... > When i set up my server account i put yahoo.com and i have Verizon for my > internet provider. I can't send my resume fr...

Any idea how to delete a custom portfolio view???
Anytime I select a custom portfolio view within Money 06 Deluxe Trial, it crashes Money and I have to reinstall (and not select that particular view) in order to use the Portfolio Manager function w/in Money. Money '05 Deluxe did the same thing, hence my "upgrade" to '06 Deluxe Trial. In what I thought was more than a strange coincidence, the same thing happened when I used Money online through MSN. It crashed Internet Explorer and now if I select Portfolio online, Internet Explorer must close. Any potential solutions other than deleting the view are most welcome. Thanks...

Macro to send grab email address and open Outlook
Hi there I am trying to write a simple macro to be able to send an email based on an emai address in a form. tblAgency Details has a field EmailAddress (data type is text) I have a Command Button on a form frmAdd Agency Details to run a macro. Macro name is SendEmail - Action is only SendObject There are only two items in the Action Arguments To: =[EmailAddress] Edit Message: Yes (I only want Outlook to load with the email address) So far it does not work. When I have a field for a Web Address and the data type is a hyperlink that works well for me....

Can't delete a particular public folder
I have a public folder (now named "Bad Folder") on my Exchange 2003 server that I can't delete. When I try to delete it, while I am logged in as "admin" on the Windows 2003 Server that the Exchange 2003 Server runs on, I get prompted for my username and password. No matter what I enter I just get re-prompted several times, followed by "The operation failed. ID 80004005. Exchange System Manager". I have check, re-checked, and changed the permissions (both "Client Permissions" and "Administrative Rights") from "anyone can do anyth...

how can I use my e-mail addresses on excel xp with microsoft outlo
I need to use my addresses on Excel xp with Microsoft outlook. I want to use my excel file as a database that I can change and improve everyday. I need to send mails to more than 1 contact, so creating an e.mail link is not enough for me: in fact, if I click on it, I send my mail only to 1 address... Txs See http://www.rondebruin.nl/sendmail.htm -- HTH RP (remove nothere from the email address if mailing direct) "Cat" <Cat@discussions.microsoft.com> wrote in message news:C7A9A930-6846-4071-8714-ED9CC50CD79F@microsoft.com... > > I need to use my addresses on E...

Problem with Addresses
I have to input an entire phone book of addresses. I have since manually typed 1175 but this is extremely time consuming and there is no end in site. Luckily, the phone book is posted on a website so I can cut and paste the entires However the entries appear on the website like this: Albis Turlington Architects, LLC Phone: 203-772-1212 175 Orange Street Fax: 203-773-1212 New Haven, CT 06510 when pasted into excel they appear in the same manner, each line in a different cell, phone and fax are in their own cells as well. The formatting ...

regarding email address
i have exchange 2003 with windows 2003 server in winodws 2000 active directory. Unexpectedly when new user is created, its email address is not generated and email address tab in the user properties shows blank. Active directory console i m running from exchange 2003 server Please assist On Sun, 4 Sep 2005 04:18:02 -0700, Faisal <Faisal@discussions.microsoft.com> wrote: >i have exchange 2003 with windows 2003 server in winodws 2000 active directory. > >Unexpectedly when new user is created, its email address is not generated >and email address tab in the user propertie...

Delete First storage group
I am running Exchange 2003 server with windows 2000 server. I created a new Storage group with a new Mailbox store in Exchange system manager. I then moved all available mailboxes to the new storage group successfully. I would like to delete the First storage group along with the priv.edb and priv.stm database files but I am unable to do so because the system attendant and SMTP mailboxes are still in the storage group. How can I move or delete these mailboxes to I can delete the Storage group and database files successfully? Thank you, Rob ...

auto fill in customer when contact selected
Hello, I hope Bertil reads this :) or someone with the same knowledge :) In a case when a user selects a contact is it possible to auto fill in the customer related to the contact?? Any help mucho appreciated. You can do this using javascript. onchange function of the field. -- Regards, MS CRM Certified Professional http://microsoftcrm3.blogspot.com Chat with me on MSN / Gmail / Skype : ID Is :.. mscrmexpert@gmail.com "Ian" wrote: > Hello, > > I hope Bertil reads this :) or someone with the same knowledge :) > > In a case when a user selects a contact...

Custom App for RMS
Hello all, I am a medium size retailer on the Outer Banks in North Carolina. I work for a watersports company called REAL Kiteboarding. We are a kiteboarding retail shop and also teach kiteboarding camps and lessons. Currently we are using Yahoo calendar to manage our camp/lesson schedule with our current POS. I have just figured setting up RMS SO and HQ to get our store running on a better POS system then what we have. I am now looking for a way to integrate a custom calendar/ booking solution with RMS to make bookings of our camps and lessons easier and more fail safe. Would any of ...

Re: o many mails in our out queue with out source Address
HI My exchange server is is having all the setting as you said still i am getting these messages. Recently i have removed few user because they left the oraganasiton, and they use to get so many Junk-E-mails do u think because of these e-mail's coming. pls if u have any ide pls let me know. Thanks Shaikh Hello Shaikh If you just want to delete those message, you can select them in "Queues" tab inside "Internet Mail service" properties and click "Delete" button. You can consider going to "Internet Mail" tab inside IMC and click Advanced but...

How do I delete outbox e-mails that aren't sent.
I can not remove an e-mail that did not successfully send. It slows all my outgoing e-mails. Any ideas would be great. http://www.howto-outlook.com/faq/messagestuckinoutbox.htm -- Kathleen Orland Outlook Tips: http://www.outlook-tips.net/ http://www.howto-outlook.com/ "jwinn" wrote: > I can not remove an e-mail that did not successfully send. It slows all my > outgoing e-mails. Any ideas would be great. ...

Need Help Using A Custom Session Manager
Hi. I have some questions about session management. I have decided to use a custom session manager class to have more control over session state in my web site. I have started out by using Stephan Prodan's Session Class here: http://stefanprodan.spaces.live.com/?_c11_BlogPart_BlogPart=blogview&_c=BlogPart&partqs=cat%3DC%2523 You'll need to take a look (which I appreciate immensely) to get a sense of what I am talking about. 1) My first question pertains to how I persist and access my session information after a user authenticates (or doesn't). In his exam...

Sent Email is deleted
After I sent my email they get deleted. I use to see them inside the sent item directory but know I they get deleted after they are sent . Any thing I should change in order to keet the email I sent Thank you for help Go to Tools, then Options. Under the Preferences Tab, click on Email Options. Make sure the 4th check box is checked. "msw" <moataz@warshanna.com> wrote in message news:e58pFrOyDHA.604@tk2msftngp13.phx.gbl... > After I sent my email they get deleted. I use to see them inside the sent > item directory but know I they get deleted after they are sent . ...