Results 1 to 4 of 4

Thread: Seriously, how to delete all Products?

  1. #1
    Sugar-Daddy is offline Sugar Community Member
    Join Date
    Jun 2011
    Posts
    49

    Default Seriously, how to delete all Products?

    [Sugar Pro]

    I've seen this question asked many times here & elsewhere, but all I've ever seen as an answer
    was "reinstall!". That is not a good enough answer.

    In my case, and countless others, the system has hundreds and thousands of opportunities, accounts, and all the trimmings of categories and types. In other words, the Products module is a new addition.

    So all the data from an existing, non-Sugarcrm system is put in CSV and painstakingly cleansed for import. But before doing so, the admin wants to know, as do others, whether there was a way to 're-do' the import. Seeing as there are no existing connections to the newly imported products, it should be a simple matter to bulk delete them and re-import, no? Sure, the product ids would be incrementing, but those ids are never seen by users, right?

    So please bring your best suggestions for "How to Delete all Products"

    TIA!

  2. #2
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: Seriously, how to delete all Products?

    Normally I'd suggest just going into the db and deleting. Not sure if you have that access. A dirty solution is to write an installable module that contains that delete query in a callable fashion.

  3. #3
    Sugar-Daddy is offline Sugar Community Member
    Join Date
    Jun 2011
    Posts
    49

    Default Re: Seriously, how to delete all Products?

    eggsurplus,

    Thanks for writing. I think that the thing folks like me are concerned about are the indexes/ids that are used to store, find and associate with other modules. And suppose that after associating a few products with existing/new opportunities, the products are deleted and reconstructed? That would mean that old product IDs would point to different projects, thus screwing up Account & Opportunity screens.

    So in the first case, if a problem is noticed on initial import, it would seem to be less intrusive (i.e. PITA) than if the imported projects has been in for a while then a big problem was discovered, requiring re-import. I can't see any recovery for this second case, which is why I'm asking the broader question, which includes both scenarios.

    Realistically, I could easily imagine new data becoming known about products, and wanting to do an update/merge for just a new/existing field or two. Say, for example, you started to number your existing products differently. You'd add the column in sugar, then populate with a CSV using update.

    Thanks again for writing!

  4. #4
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: Seriously, how to delete all Products?

    I completely understand.

    To maintain data integrity I'd recommend keeping track of the Sugar product ID in the 3rd party system that contains your products. Then when you import it would only update the existing product if there was an ID match. If no ID then it would create a new product. This is generally how this scenario is handled. You can get the Sugar product ID out of the system by doing an export. There are ways to automate this syncing of IDs and this is where you'd want to look into integration solutions such as an ETL. It doesn't need to get that fancy though. Could be a simple script as well. Depends on how complex/simple you want to make it.

    Hope this helps!
    -Jason

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How do you delete the products catalog
    By ChristianC in forum Sales Force Automation
    Replies: 0
    Last Post: 2011-10-09, 03:34 PM
  2. Replies: 0
    Last Post: 2011-01-20, 01:34 PM
  3. Delete custom field but label not delete
    By danchua in forum Help
    Replies: 5
    Last Post: 2009-06-23, 04:27 PM
  4. Delete E-Mail does not delete attachment
    By josef53 in forum Help
    Replies: 5
    Last Post: 2005-10-24, 01:23 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •